diff options
| author | degasus <wickmarkus@web.de> | 2017-02-27 22:58:14 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2017-02-27 23:50:16 +0100 |
| commit | c1ddc2678e206eb4eefc519b5ed1368bf42be293 (patch) | |
| tree | e060fdc977ad46af8a4d15debb8677038b42ea9a /Source/Core | |
| parent | 1d69e23be0de9d1bafc87e58d71b1faa6dd1e0be (diff) | |
JitCache: Fix removing of blocks.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/PowerPC/JitCommon/JitCache.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp index 7faf3b1258..af76158faa 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp @@ -243,7 +243,16 @@ void JitBaseBlockCache::ErasePhysicalRange(u32 address, u32 length) // And remove the 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); } else |
