mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 22:29:21 +00:00
JitCache: Fix removing of blocks.
This commit is contained in:
parent
1d69e23be0
commit
c1ddc2678e
1 changed files with 10 additions and 1 deletions
|
@ -243,7 +243,16 @@ void JitBaseBlockCache::ErasePhysicalRange(u32 address, u32 length)
|
||||||
|
|
||||||
// And remove the block.
|
// And remove the block.
|
||||||
DestroyBlock(*block);
|
DestroyBlock(*block);
|
||||||
block_map.erase(block->physicalAddress);
|
auto block_map_iter = block_map.equal_range(block->physicalAddress);
|
||||||
|
while (block_map_iter.first != block_map_iter.second)
|
||||||
|
{
|
||||||
|
if (&block_map_iter.first->second == block)
|
||||||
|
{
|
||||||
|
block_map.erase(block_map_iter.first);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
block_map_iter.first++;
|
||||||
|
}
|
||||||
iter = start->second.erase(iter);
|
iter = start->second.erase(iter);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue