From ba6c04c6f072a12b96b3b8b2fe71d63ba3cbbbe8 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Mon, 26 Jan 2015 14:52:55 +1100 Subject: [PATCH] Fix up Start Emulation causing Project 64 to crash out, g_BaseSystem --- Source/Project64/User Interface/Main Menu Class.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Project64/User Interface/Main Menu Class.cpp b/Source/Project64/User Interface/Main Menu Class.cpp index af241de87..f4e55b06b 100644 --- a/Source/Project64/User Interface/Main Menu Class.cpp +++ b/Source/Project64/User Interface/Main Menu Class.cpp @@ -77,6 +77,11 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD break; case ID_FILE_STARTEMULATION: _Gui->SaveWindowLoc(); + //Before we go and create the new system, ensure the previous one has been closed + CN64System::CloseSystem(); + //Ok now g_BaseSystem should definitely be clean for initialization + g_BaseSystem = new CN64System(g_Plugins, false); + //Now we have created again, we can start up emulation g_BaseSystem->StartEmulation(true); break; case ID_FILE_ENDEMULATION: