From 38a6dbbc42be48b3a71c076f687a838b2f3c2e3a Mon Sep 17 00:00:00 2001 From: Qstick Date: Sat, 28 Oct 2017 23:40:27 -0400 Subject: [PATCH] Fixed: Null Check on Sabnzbd Version Parse --- src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs b/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs index 5969f5d0c..1312498fc 100644 --- a/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs +++ b/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs @@ -314,6 +314,11 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd private Version ParseVersion(string version) { + if (version.IsNullOrWhiteSpace()) + { + return null; + } + var parsed = VersionRegex.Match(version); int major; @@ -351,7 +356,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd if (version == null) { - return new ValidationFailure("Version", "Unknown Version: " + version); + return new ValidationFailure("Version", "Unknown Version: " + rawVersion); } if (rawVersion.Equals("develop", StringComparison.InvariantCultureIgnoreCase))