From 24d68da653b6def668ff6946586e60f94aa082af Mon Sep 17 00:00:00 2001 From: John Peterson Date: Mon, 7 Sep 2009 13:33:40 +0000 Subject: GUI/OpenGL: Video debugging window crash fix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4225 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp') diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp index b2819eafcb..0af54775d2 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp @@ -46,15 +46,20 @@ GFXDebuggerOGL::GFXDebuggerOGL(wxWindow *parent, wxWindowID id, const wxString & GFXDebuggerOGL::~GFXDebuggerOGL() { SaveSettings(); + m_DebuggerFrame = NULL; NOTICE_LOG(CONSOLE, "Stop [Video Thread]: Closing OpenGL debugging window"); } void GFXDebuggerOGL::OnClose(wxCloseEvent& event) { - // save the window position when we hide the window + // This means wxDialog's Destroy is used + //event.Skip(); + + // Save the window position SaveSettings(); - event.Skip(); // This means wxDialog's Destroy is used + // Destroy + delete this; } void GFXDebuggerOGL::SaveSettings() const -- cgit v1.2.3