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