Minfor fix for last commit

This commit is contained in:
niksedk 2021-11-20 16:45:44 +01:00
parent 6d7c1dd645
commit 92e9a58e28

View File

@ -2180,7 +2180,7 @@ namespace Nikse.SubtitleEdit.Core.Common
text = new Regex(@"([0456789]) (th)\b").Replace(text, "$1$2");
}
if ("en-da-es-sv-de-nb-cz".Contains(language) && text.ContainsNumber())
if (language != null && "en-da-es-sv-de-nb-cz".Contains(language) && text.ContainsNumber())
{
text = RegexNumberSpacePeriod.Replace(text, "$1$2");
}