Crashfix in savestate (hmmmm...)

This commit is contained in:
Henrik Rydgard 2016-05-12 12:18:12 +02:00
parent 2cbfb192c4
commit cb251ea93f

View File

@ -234,9 +234,14 @@ namespace SaveState
if (MIPSComp::jit && p.mode == p.MODE_WRITE)
{
auto blockCache = MIPSComp::jit->GetBlockCache();
auto savedBlocks = blockCache->SaveAndClearEmuHackOps();
std::vector<u32> savedBlocks;
if (blockCache) {
savedBlocks = blockCache->SaveAndClearEmuHackOps();
}
Memory::DoState(p);
blockCache->RestoreSavedEmuHackOps(savedBlocks);
if (blockCache) {
blockCache->RestoreSavedEmuHackOps(savedBlocks);
}
}
else
Memory::DoState(p);