From ec0f9e49c36b6fc45b0e8ea795a3aa4e70595390 Mon Sep 17 00:00:00 2001 From: Roel Aaij Date: Sun, 30 Mar 2014 15:39:02 +0200 Subject: [PATCH] Fix segfault in non-dev build by adding extra check for NULL. --- pcsx2/gui/App.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcsx2/gui/App.h b/pcsx2/gui/App.h index 8595b04d0c..2937e715cf 100644 --- a/pcsx2/gui/App.h +++ b/pcsx2/gui/App.h @@ -529,7 +529,7 @@ public: GSFrame* GetGsFramePtr() const { return (GSFrame*)wxWindow::FindWindowById( m_id_GsFrame ); } MainEmuFrame* GetMainFramePtr() const { return (MainEmuFrame*)wxWindow::FindWindowById( m_id_MainFrame ); } - DisassemblyDialog* GetDisassemblyPtr() const { return (DisassemblyDialog*)wxWindow::FindWindowById( m_id_Disassembler ); } + DisassemblyDialog* GetDisassemblyPtr() const { return m_id_Disassembler ? (DisassemblyDialog*)wxWindow::FindWindowById( m_id_Disassembler ) : NULL; } void enterDebugMode(); void leaveDebugMode(); @@ -749,4 +749,4 @@ extern void UI_DisableSysShutdown(); extern ExecutorThread& GetSysExecutorThread(); -extern bool g_ConfigPanelChanged; //Indicates that the main config panel is open and holds unapplied changes. \ No newline at end of file +extern bool g_ConfigPanelChanged; //Indicates that the main config panel is open and holds unapplied changes.