From cb251ea93fa4296833e4ea7b4eca442bd88bb003 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Thu, 12 May 2016 12:18:12 +0200 Subject: [PATCH] Crashfix in savestate (hmmmm...) --- Core/SaveState.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Core/SaveState.cpp b/Core/SaveState.cpp index bf6f30eee..0b4465144 100644 --- a/Core/SaveState.cpp +++ b/Core/SaveState.cpp @@ -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 savedBlocks; + if (blockCache) { + savedBlocks = blockCache->SaveAndClearEmuHackOps(); + } Memory::DoState(p); - blockCache->RestoreSavedEmuHackOps(savedBlocks); + if (blockCache) { + blockCache->RestoreSavedEmuHackOps(savedBlocks); + } } else Memory::DoState(p);