mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
Quick fix for an invalid iterator
This commit is contained in:
parent
6d273f6119
commit
829fc3dc2d
1 changed files with 3 additions and 3 deletions
|
@ -933,16 +933,16 @@ TextureCache::TCacheEntryBase* TextureCache::AllocateTexture(const TCacheEntryCo
|
||||||
INCSTAT(stats.numTexturesCreated);
|
INCSTAT(stats.numTexturesCreated);
|
||||||
}
|
}
|
||||||
|
|
||||||
entry->textures_by_hash_iter = textures_by_address.end();
|
entry->textures_by_hash_iter = textures_by_hash.end();
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
TextureCache::TexCache::iterator TextureCache::RemoveTextureFromCache(TexCache::iterator iter)
|
TextureCache::TexCache::iterator TextureCache::RemoveTextureFromCache(TexCache::iterator iter)
|
||||||
{
|
{
|
||||||
if (iter->second->textures_by_hash_iter != textures_by_address.end())
|
if (iter->second->textures_by_hash_iter != textures_by_hash.end())
|
||||||
{
|
{
|
||||||
textures_by_hash.erase(iter->second->textures_by_hash_iter);
|
textures_by_hash.erase(iter->second->textures_by_hash_iter);
|
||||||
iter->second->textures_by_hash_iter = textures_by_address.end();
|
iter->second->textures_by_hash_iter = textures_by_hash.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
FreeTexture(iter->second);
|
FreeTexture(iter->second);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue