From 451b262672865679b4ca01777ae5b5772efc7aba Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sat, 25 Feb 2012 02:58:04 +0000 Subject: [PATCH] Increment iterators before erasing them rather than after Originally committed to SVN as r6515. --- aegisub/src/block_cache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aegisub/src/block_cache.h b/aegisub/src/block_cache.h index 5e7134ba3..222ea68cf 100644 --- a/aegisub/src/block_cache.h +++ b/aegisub/src/block_cache.h @@ -224,9 +224,9 @@ public: cur_size += (ba.size() - std::count(ba.begin(), ba.end(), (BlockT*)0)) * block_size; } // Hit max, clear all remaining blocks - for (; it != age.end(); ++it) + for (; it != age.end();) { - KillMacroBlock(**it); + KillMacroBlock(**it++); } }