From 6a5ad0ffdb0b9a6fcb40569df935fcdd9853d817 Mon Sep 17 00:00:00 2001 From: "XTra.KrazzY" Date: Sun, 21 Sep 2008 09:59:40 +0000 Subject: [PATCH] Now stopping doesn't crash with the message "Tried to execute code that's not marked executable" (Access Violation error) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@592 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/MemTools.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Core/Core/Src/MemTools.cpp b/Source/Core/Core/Src/MemTools.cpp index b5c296db2a..154db1c499 100644 --- a/Source/Core/Core/Src/MemTools.cpp +++ b/Source/Core/Core/Src/MemTools.cpp @@ -25,6 +25,7 @@ #include "Common.h" #include "MemTools.h" #include "HW/Memmap.h" +#include "PowerPC/PowerPC.h" #include "PowerPC/Jit64/Jit.h" #include "PowerPC/Jit64/JitBackpatch.h" #include "x64Analyzer.h" @@ -41,6 +42,10 @@ LONG NTAPI Handler(PEXCEPTION_POINTERS pPtrs) int accessType = (int)pPtrs->ExceptionRecord->ExceptionInformation[0]; if (accessType == 8) //Rule out DEP { + if(PowerPC::state == PowerPC::CPU_POWERDOWN) // Access violation during + // violent shutdown is fine + return EXCEPTION_CONTINUE_EXECUTION; + MessageBox(0, _T("Tried to execute code that's not marked executable. This is likely a JIT bug.\n"), 0, 0); return EXCEPTION_CONTINUE_SEARCH; }