summaryrefslogtreecommitdiffstats
path: root/src/SetChunkData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/SetChunkData.cpp')
-rw-r--r--src/SetChunkData.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/SetChunkData.cpp b/src/SetChunkData.cpp
index 7549b0dbf..c0ae31fd3 100644
--- a/src/SetChunkData.cpp
+++ b/src/SetChunkData.cpp
@@ -131,8 +131,11 @@ void cSetChunkData::RemoveInvalidBlockEntities(void)
ItemTypeToString(EntityBlockType).c_str(), EntityBlockType,
ItemTypeToString(WorldBlockType).c_str(), WorldBlockType
);
+ cBlockEntityList::iterator itr2 = itr;
+ ++itr2;
delete *itr;
- itr = m_BlockEntities.erase(itr);
+ m_BlockEntities.erase(itr);
+ itr = itr2;
}
else
{