summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/TextureCacheBase.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
index e3152455df..cfbd4eb6c8 100644
--- a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
@@ -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)