From add29887895feeb4b11051aebb70086c55352b4a Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 20 Sep 2023 02:54:25 +0300 Subject: [PATCH] Fixed: (Cardigann) Fallback variables to empty string to prevent NullRef --- .../Indexers/Definitions/Cardigann/CardigannBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannBase.cs b/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannBase.cs index 7123b3d86..70cec36f6 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannBase.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannBase.cs @@ -374,7 +374,7 @@ namespace NzbDrone.Core.Indexers.Definitions.Cardigann var newvalue = reReplaceRegexMatches.Groups[3].Value; var replaceRegex = new Regex(regexp); - var input = (string)variables[variable]; + var input = (string)variables[variable] ?? string.Empty; var expanded = replaceRegex.Replace(input, newvalue); if (modifier != null)