Don't do checks on `MovieSession.QueuedCoreName` when no movie queued

fixes cc59818d6
This commit is contained in:
YoshiRulz 2025-05-27 11:06:56 +10:00
parent 285d8560cb
commit a4ce9e93dc
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 3 additions and 2 deletions

View File

@ -3821,8 +3821,9 @@ namespace BizHawk.Client.EmuHawk
//path = ioa_openrom.Path;
}
var forcedCoreName = MovieSession.QueuedCoreName ?? string.Empty;
if (!CoreInventory.Instance.SystemsFlat.Any(core => core.Name == forcedCoreName))
var forcedCoreName = MovieSession.QueuedCoreName;
if (forcedCoreName is not null
&& !CoreInventory.Instance.SystemsFlat.Any(core => core.Name == forcedCoreName))
{
const string FMT_STR_NO_SUCH_CORE = "This movie is for the \"{0}\" core,"
+ " but that's not a valid {1} core. (Was the movie made in this version of EmuHawk?)"