diff --git a/tools/GSDumpGUI/Core/Program.cs b/tools/GSDumpGUI/Core/Program.cs index b8ec038240..11884c65e3 100644 --- a/tools/GSDumpGUI/Core/Program.cs +++ b/tools/GSDumpGUI/Core/Program.cs @@ -299,6 +299,15 @@ namespace GSDumpGUI { frmMain.lstProcesses.Items.Add(itm.IPAddress); } + if (frmMain.lstProcesses.SelectedIndex == -1) + { + frmMain.chkDebugMode.Checked = false; + frmMain.lblGif.Enabled = frmMain.chkDebugMode.Checked; + frmMain.btnRunToSelection.Enabled = frmMain.chkDebugMode.Checked; + frmMain.treTreeView.Enabled = frmMain.chkDebugMode.Checked; + frmMain.btnStep.Enabled = frmMain.chkDebugMode.Checked; + frmMain.treTreeView.Nodes.Clear(); + } }), new object[] { null}); } } diff --git a/tools/GSDumpGUI/Forms/frmMain.cs b/tools/GSDumpGUI/Forms/frmMain.cs index 6a26822aca..66ebc8d0c3 100644 --- a/tools/GSDumpGUI/Forms/frmMain.cs +++ b/tools/GSDumpGUI/Forms/frmMain.cs @@ -399,10 +399,13 @@ namespace GSDumpGUI private void chkDebugMode_CheckedChanged(object sender, EventArgs e) { - TCPMessage msg = new TCPMessage(); - msg.MessageType = MessageType.SetDebugMode; - msg.Parameters.Add(chkDebugMode.Checked); - Program.Clients.Find(a => a.IPAddress == lstProcesses.SelectedItem.ToString()).Send(msg); + if (lstProcesses.SelectedIndex != -1) + { + TCPMessage msg = new TCPMessage(); + msg.MessageType = MessageType.SetDebugMode; + msg.Parameters.Add(chkDebugMode.Checked); + Program.Clients.Find(a => a.IPAddress == lstProcesses.SelectedItem.ToString()).Send(msg); + } } private void btnStep_Click(object sender, EventArgs e)