From fe8b20e9d159e135d6c6184ca89a93ef70971d69 Mon Sep 17 00:00:00 2001 From: zilmar Date: Sat, 2 Apr 2016 21:34:28 +1100 Subject: [PATCH] {Projct64] Put end emulation menu option in critical section --- Source/Project64/UserInterface/MainMenuClass.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/Project64/UserInterface/MainMenuClass.cpp b/Source/Project64/UserInterface/MainMenuClass.cpp index 17095778d..fc332e643 100644 --- a/Source/Project64/UserInterface/MainMenuClass.cpp +++ b/Source/Project64/UserInterface/MainMenuClass.cpp @@ -179,9 +179,12 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI g_BaseSystem->StartEmulation(true); break; case ID_FILE_ENDEMULATION: - WriteTrace(TraceUserInterface, TraceDebug, "ID_FILE_ENDEMULATION"); - CN64System::CloseSystem(); - m_Gui->SaveWindowLoc(); + { + CGuard Guard(m_CS); + WriteTrace(TraceUserInterface, TraceDebug, "ID_FILE_ENDEMULATION"); + CN64System::CloseSystem(); + m_Gui->SaveWindowLoc(); + } break; case ID_FILE_ROMDIRECTORY: WriteTrace(TraceUserInterface, TraceDebug, "ID_FILE_ROMDIRECTORY 1");