diff --git a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp index 462708a191..58586fa23c 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp @@ -306,9 +306,8 @@ void JitBaseBlockCache::LinkBlock(JitBlock& b) } } -void JitBaseBlockCache::UnlinkBlock(int i) +void JitBaseBlockCache::UnlinkBlock(const JitBlock& b) { - JitBlock& b = blocks[i]; auto ppp = links_to.equal_range(b.effectiveAddress); for (auto iter = ppp.first; iter != ppp.second; ++iter) @@ -346,7 +345,7 @@ void JitBaseBlockCache::DestroyBlock(int block_num, bool invalidate) start_block_map.erase(b.physicalAddress); FastLookupEntryForAddress(b.effectiveAddress) = 0; - UnlinkBlock(block_num); + UnlinkBlock(b); // Delete linking addresses auto it = links_to.equal_range(b.effectiveAddress); diff --git a/Source/Core/Core/PowerPC/JitCommon/JitCache.h b/Source/Core/Core/PowerPC/JitCommon/JitCache.h index d2240e02fd..e47723eb2f 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitCache.h +++ b/Source/Core/Core/PowerPC/JitCommon/JitCache.h @@ -157,7 +157,7 @@ private: void LinkBlockExits(JitBlock& b); void LinkBlock(JitBlock& b); - void UnlinkBlock(int i); + void UnlinkBlock(const JitBlock& b); void DestroyBlock(int block_num, bool invalidate); void MoveBlockIntoFastCache(u32 em_address, u32 msr);