mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Fix an issue where an iterator would become invalidated in TextureCache::ClearRenderTargets()
This commit is contained in:
@ -204,12 +204,16 @@ void TextureCache::ClearRenderTargets()
|
|||||||
iter = textures.begin(),
|
iter = textures.begin(),
|
||||||
tcend = textures.end();
|
tcend = textures.end();
|
||||||
|
|
||||||
for (; iter!=tcend; ++iter)
|
while (iter != tcend)
|
||||||
|
{
|
||||||
if (iter->second->type == TCET_EC_VRAM)
|
if (iter->second->type == TCET_EC_VRAM)
|
||||||
{
|
{
|
||||||
delete iter->second;
|
delete iter->second;
|
||||||
textures.erase(iter);
|
textures.erase(iter++);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
++iter;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TextureCache::CheckForCustomTextureLODs(u64 tex_hash, int texformat, unsigned int levels)
|
bool TextureCache::CheckForCustomTextureLODs(u64 tex_hash, int texformat, unsigned int levels)
|
||||||
|
Reference in New Issue
Block a user