Fix playing a movie when core is not specified and core is not one we support switching of

#2476
This commit is contained in:
nattthebear 2020-11-12 15:12:00 -05:00
parent 04a60cd0df
commit ebf0f6685e
1 changed files with 8 additions and 1 deletions

View File

@ -205,7 +205,14 @@ namespace BizHawk.Client.Common
{ {
if (string.IsNullOrWhiteSpace(movie.Core)) if (string.IsNullOrWhiteSpace(movie.Core))
{ {
PopupMessage($"No core specified in the movie file, using the preferred core {preferredCores[systemId]} instead."); if (preferredCores.TryGetValue(systemId, out var coreName))
{
PopupMessage($"No core specified in the movie file, using the preferred core {preferredCores[systemId]} instead.");
}
else
{
PopupMessage($"No core specified in the movie file, using the default core instead.");
}
} }
else else
{ {