From d522d8ad8614ac09ea3ae11564c173bc7934f39b Mon Sep 17 00:00:00 2001 From: "fires.gc" Date: Thu, 24 Jul 2008 14:12:09 +0000 Subject: [PATCH] crash fix for debugger in release mode git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@83 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DebuggerWX/src/CodeWindow.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/Core/DebuggerWX/src/CodeWindow.cpp b/Source/Core/DebuggerWX/src/CodeWindow.cpp index e865848949..b878dff18d 100644 --- a/Source/Core/DebuggerWX/src/CodeWindow.cpp +++ b/Source/Core/DebuggerWX/src/CodeWindow.cpp @@ -106,10 +106,10 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter file.Load("Debugger.ini"); this->Load(file); - m_BreakpointWindow->Load(file); - m_LogWindow->Load(file); - m_RegisterWindow->Load(file); - m_MemoryWindow->Load(file); + if (m_BreakpointWindow) m_BreakpointWindow->Load(file); + if (m_LogWindow) m_LogWindow->Load(file); + if (m_RegisterWindow) m_RegisterWindow->Load(file); + if (m_MemoryWindow) m_MemoryWindow->Load(file); } @@ -119,10 +119,10 @@ CCodeWindow::~CCodeWindow() file.Load("Debugger.ini"); this->Save(file); - m_BreakpointWindow->Save(file); - m_LogWindow->Save(file); - m_RegisterWindow->Save(file); - m_MemoryWindow->Save(file); + if (m_BreakpointWindow) m_BreakpointWindow->Save(file); + if (m_LogWindow) m_LogWindow->Save(file); + if (m_RegisterWindow) m_RegisterWindow->Save(file); + if (m_MemoryWindow) m_MemoryWindow->Save(file); file.Save("Debugger.ini"); } @@ -636,7 +636,7 @@ void CCodeWindow::InitBitmaps() void CCodeWindow::OnKeyDown(wxKeyEvent& event) { - if (event.GetKeyCode() == WXK_SPACE) + if ((event.GetKeyCode() == WXK_SPACE) && IsActive()) { SingleCPUStep(); }