mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Fix null return value dereference CID 18162
This commit is contained in:
parent
d9440afdb1
commit
0b01b11cce
@ -38,12 +38,18 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (key.Length == 0 || value.Length == 0 || key == value)
|
||||
return;
|
||||
|
||||
var languageString = LanguageString;
|
||||
if (languageString == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var ci = new CultureInfo(LanguageString.Replace("_", "-"));
|
||||
var ci = new CultureInfo(languageString.Replace("_", "-"));
|
||||
_threeLetterIsoLanguageName = ci.ThreeLetterISOLanguageName;
|
||||
}
|
||||
catch (Exception exception)
|
||||
catch (CultureNotFoundException exception)
|
||||
{
|
||||
MessageBox.Show(exception.Message);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user