Fix exception when hovering over Config -> Cores -> Snes when the user has never opened a SNES game

This commit is contained in:
adelikat 2016-12-06 11:26:43 -06:00
parent 6889a72ba2
commit d305b048fc
1 changed files with 6 additions and 1 deletions

View File

@ -1185,7 +1185,12 @@ namespace BizHawk.Client.EmuHawk
Coresnes9xMenuItem.Checked = Global.Config.SNES_InSnes9x;
Coresnes9xMenuItem.Visible = VersionInfo.DeveloperBuild;
var sss = (LibsnesCore.SnesSyncSettings)Global.Config.GetCoreSyncSettings<LibsnesCore>();
LibsnesCore.SnesSyncSettings sss = (LibsnesCore.SnesSyncSettings)Global.Config.GetCoreSyncSettings<LibsnesCore>();
if (sss == null)
{
sss = new LibsnesCore.SnesSyncSettings();
}
CorebsnesPerformanceMenuItem.Checked = sss.Profile == "Performance";
CorebsnesCompatibilityMenuItem.Checked = sss.Profile == "Compatibility";
}