CPU/CodeCache: Fix crash when jumping to invalid block in recompiler

This commit is contained in:
Connor McLaughlin 2020-10-30 20:44:21 +10:00
parent 8f20ffaed3
commit 2e53bf914e
1 changed files with 2 additions and 3 deletions

View File

@ -400,6 +400,7 @@ CodeBlock* LookupBlock(CodeBlockKey key)
#ifdef WITH_RECOMPILER #ifdef WITH_RECOMPILER
SetFastMap(block->GetPC(), block->host_code); SetFastMap(block->GetPC(), block->host_code);
AddBlockToHostCodeMap(block);
#endif #endif
} }
else else
@ -409,9 +410,7 @@ CodeBlock* LookupBlock(CodeBlockKey key)
block = nullptr; block = nullptr;
} }
iter = s_blocks.emplace(key.bits, block).first; s_blocks.emplace(key.bits, block);
AddBlockToHostCodeMap(block);
return block; return block;
} }