From 937f5b11a2795d91a033da953405f6f7b5c7a665 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Mon, 26 Aug 2013 12:25:19 +0200 Subject: [PATCH] fixed broken record deletion --- apps/opencs/model/world/collection.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/opencs/model/world/collection.hpp b/apps/opencs/model/world/collection.hpp index 526c07815..6cf31d0a4 100644 --- a/apps/opencs/model/world/collection.hpp +++ b/apps/opencs/model/world/collection.hpp @@ -236,14 +236,15 @@ namespace CSMWorld if (iter->second>=index+count) { iter->second -= count; + ++iter; } else { mIndex.erase (iter++); } } - - ++iter; + else + ++iter; } }