mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-20 11:35:54 +00:00
Fix an issue where an iterator would become invalidated in TextureCache::ClearRenderTargets()
This commit is contained in:
parent
4f4aa4860d
commit
d9ea718559
1 changed files with 6 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue