mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Fix a crash if JIT space failed to allocate
This commit is contained in:
1 parent
2fef4c4a9c
commit
c0a5fa3e8b
2 files changed
+6
-1
No files matched your search
@@ -71,6 +71,9 @@ public:
|
||||
// Always clear code space with breakpoints, so that if someone accidentally executes
|
||||
// uninitialized, it just breaks into the debugger.
|
||||
void ClearCodeSpace(int offset) {
|
||||
if (!region) {
|
||||
return;
|
||||
}
|
||||
if (PlatformIsWXExclusive()) {
|
||||
ProtectMemoryPages(region, region_size, MEM_PROT_READ | MEM_PROT_WRITE);
|
||||
}
|
||||
|
||||
@@ -1390,5 +1390,7 @@ VertexDecoderJitCache::VertexDecoderJitCache()
|
||||
}
|
||||
|
||||
void VertexDecoderJitCache::Clear() {
|
||||
ClearCodeSpace(0);
|
||||
if (g_Config.iCpuCore == (int)CPUCore::JIT) {
|
||||
ClearCodeSpace(0);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user