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
This commit is contained in:
XTra.KrazzY 2008-09-21 09:59:40 +00:00
parent 3e2419776f
commit 6a5ad0ffdb
1 changed files with 5 additions and 0 deletions

View File

@ -25,6 +25,7 @@
#include "Common.h" #include "Common.h"
#include "MemTools.h" #include "MemTools.h"
#include "HW/Memmap.h" #include "HW/Memmap.h"
#include "PowerPC/PowerPC.h"
#include "PowerPC/Jit64/Jit.h" #include "PowerPC/Jit64/Jit.h"
#include "PowerPC/Jit64/JitBackpatch.h" #include "PowerPC/Jit64/JitBackpatch.h"
#include "x64Analyzer.h" #include "x64Analyzer.h"
@ -41,6 +42,10 @@ LONG NTAPI Handler(PEXCEPTION_POINTERS pPtrs)
int accessType = (int)pPtrs->ExceptionRecord->ExceptionInformation[0]; int accessType = (int)pPtrs->ExceptionRecord->ExceptionInformation[0];
if (accessType == 8) //Rule out DEP 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); 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; return EXCEPTION_CONTINUE_SEARCH;
} }