From f305ca5666c5c1236b1a065029fb96fadc5f2462 Mon Sep 17 00:00:00 2001 From: adelikat Date: Wed, 25 Feb 2015 22:32:50 +0000 Subject: [PATCH] Don't crash if user elected to autoload Ram Watch but not autoload a Rom --- BizHawk.Client.EmuHawk/tools/ToolManager.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/ToolManager.cs b/BizHawk.Client.EmuHawk/tools/ToolManager.cs index a6adcf76f7..7834fd95ee 100644 --- a/BizHawk.Client.EmuHawk/tools/ToolManager.cs +++ b/BizHawk.Client.EmuHawk/tools/ToolManager.cs @@ -736,14 +736,17 @@ namespace BizHawk.Client.EmuHawk { Load(); - if (Global.Config.RecentWatches.AutoLoad && !Global.Config.RecentWatches.Empty) + if (IsAvailable()) // Just because we attempted to load it, doesn't mean it was, the current core may not have the correct dependencies { - RamWatch.LoadFileFromRecent(Global.Config.RecentWatches.MostRecent); - } + if (Global.Config.RecentWatches.AutoLoad && !Global.Config.RecentWatches.Empty) + { + RamWatch.LoadFileFromRecent(Global.Config.RecentWatches.MostRecent); + } - if (!loadDialog) - { - Get().Close(); + if (!loadDialog) + { + Get().Close(); + } } }