Fixed: Null Check on Sabnzbd Version Parse

pull/110/head
Qstick 7 years ago
parent 311df71acf
commit 38a6dbbc42

@ -314,6 +314,11 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
private Version ParseVersion(string version) private Version ParseVersion(string version)
{ {
if (version.IsNullOrWhiteSpace())
{
return null;
}
var parsed = VersionRegex.Match(version); var parsed = VersionRegex.Match(version);
int major; int major;
@ -351,7 +356,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
if (version == null) if (version == null)
{ {
return new ValidationFailure("Version", "Unknown Version: " + version); return new ValidationFailure("Version", "Unknown Version: " + rawVersion);
} }
if (rawVersion.Equals("develop", StringComparison.InvariantCultureIgnoreCase)) if (rawVersion.Equals("develop", StringComparison.InvariantCultureIgnoreCase))

Loading…
Cancel
Save