From 45f1a4b64f629b5f8ef25d94eeaeb00867bdd2b4 Mon Sep 17 00:00:00 2001 From: "J.D. Purcell" Date: Sun, 9 Apr 2017 23:23:20 -0400 Subject: [PATCH] Disable MultiHawk's View menu when no ROM is loaded to prevent crash. --- BizHawk.Client.MultiHawk/Mainform.Designer.cs | 1 + BizHawk.Client.MultiHawk/Mainform.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/BizHawk.Client.MultiHawk/Mainform.Designer.cs b/BizHawk.Client.MultiHawk/Mainform.Designer.cs index d02a8cd630..51157dee4f 100644 --- a/BizHawk.Client.MultiHawk/Mainform.Designer.cs +++ b/BizHawk.Client.MultiHawk/Mainform.Designer.cs @@ -218,6 +218,7 @@ this._2xMenuItem, this._3xMenuItem, this._4xMenuItem}); + this.ViewSubMenu.Enabled = false; this.ViewSubMenu.Name = "ViewSubMenu"; this.ViewSubMenu.Size = new System.Drawing.Size(44, 20); this.ViewSubMenu.Text = "&View"; diff --git a/BizHawk.Client.MultiHawk/Mainform.cs b/BizHawk.Client.MultiHawk/Mainform.cs index 0facf7c15e..3e25e71ed2 100644 --- a/BizHawk.Client.MultiHawk/Mainform.cs +++ b/BizHawk.Client.MultiHawk/Mainform.cs @@ -372,6 +372,7 @@ namespace BizHawk.Client.MultiHawk if (EmulatorWindows.Count == 1) { Emulator = ew.Emulator; + ViewSubMenu.Enabled = true; } _inputManager.SyncControls(); @@ -1289,6 +1290,7 @@ namespace BizHawk.Client.MultiHawk else { Emulator = null; + ViewSubMenu.Enabled = false; } } }