Prevent NullRef in IsPathValid for null paths

This commit is contained in:
Bogdan 2023-08-09 13:35:13 +03:00
parent e66ecf5c95
commit 03fa9254e3

View file

@ -138,7 +138,7 @@ namespace NzbDrone.Common.Extensions
public static bool IsPathValid(this string path, PathValidationType validationType)
{
if (path.ContainsInvalidPathChars() || string.IsNullOrWhiteSpace(path))
if (string.IsNullOrWhiteSpace(path) || path.ContainsInvalidPathChars())
{
return false;
}