mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-19 06:45:39 +00:00
CPU/CodeCache: Fix crash when jumping to invalid block in recompiler
This commit is contained in:
parent
8f20ffaed3
commit
2e53bf914e
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue