From 64d979206757fda4c60fb8ab4a9a30fb04dce35b Mon Sep 17 00:00:00 2001 From: riccardom Date: Sun, 15 May 2011 16:41:51 +0000 Subject: [PATCH] wx: don't crash on pause if no rom is loaded MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A different version of a patch from Jan Bücken (nooris), #3288648 --- desmume/src/wx/wxMain.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/desmume/src/wx/wxMain.cpp b/desmume/src/wx/wxMain.cpp index 595d08507..ebd660a97 100644 --- a/desmume/src/wx/wxMain.cpp +++ b/desmume/src/wx/wxMain.cpp @@ -524,6 +524,9 @@ void DesmumeFrame::onIdle(wxIdleEvent &event) void DesmumeFrame::pause(wxCommandEvent& event) { + if (gameInfo.romdata == NULL) + return; + if (execute) { execute=false; SPU_Pause(1);