From d305b048fcd5a3e781a2a45abbe8cc77877c48c3 Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 6 Dec 2016 11:26:43 -0600 Subject: [PATCH] Fix exception when hovering over Config -> Cores -> Snes when the user has never opened a SNES game --- BizHawk.Client.EmuHawk/MainForm.Events.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.EmuHawk/MainForm.Events.cs b/BizHawk.Client.EmuHawk/MainForm.Events.cs index 8d6b8acd9c..0e36057881 100644 --- a/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -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.SnesSyncSettings sss = (LibsnesCore.SnesSyncSettings)Global.Config.GetCoreSyncSettings(); + if (sss == null) + { + sss = new LibsnesCore.SnesSyncSettings(); + } + CorebsnesPerformanceMenuItem.Checked = sss.Profile == "Performance"; CorebsnesCompatibilityMenuItem.Checked = sss.Profile == "Compatibility"; }