Fixed crash in TTML properties - thx ryzen88 :)

Related to #8043
This commit is contained in:
Nikolaj Olsson 2024-03-31 17:50:42 +02:00
parent 499bc16b4d
commit cfa8bbc54a
2 changed files with 2 additions and 2 deletions

View File

@ -320,7 +320,7 @@ namespace Nikse.SubtitleEdit.Forms
var favoriteFormats = Configuration.Settings.General.FavoriteSubtitleFormats;
var currentTimedTextWithExt = $"Timed Text 1.0 ({currentTimedTextExt})";
var newTimedTextWithExt = $"Timed Text 1.0 ({newTimedTextExt})";
if (favoriteFormats.Contains(currentTimedTextWithExt))
if (favoriteFormats != null && favoriteFormats.Contains(currentTimedTextWithExt))
{
Configuration.Settings.General.FavoriteSubtitleFormats = favoriteFormats.Replace(currentTimedTextWithExt, newTimedTextWithExt);
}

View File

@ -224,7 +224,7 @@ namespace Nikse.SubtitleEdit.Forms
var favoriteFormats = Configuration.Settings.General.FavoriteSubtitleFormats;
var currentTimedTextWithExt = $"Timed Text 1.0 ({currentTimedTextExt})";
var newTimedTextWithExt = $"Timed Text 1.0 ({newTimedTextExt})";
if (favoriteFormats.Contains(currentTimedTextWithExt))
if (favoriteFormats != null && favoriteFormats.Contains(currentTimedTextWithExt))
{
Configuration.Settings.General.FavoriteSubtitleFormats = favoriteFormats.Replace(currentTimedTextWithExt, newTimedTextWithExt);
}