summaryrefslogtreecommitdiffstats
path: root/source/cWorld.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/cWorld.cpp')
-rw-r--r--source/cWorld.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/cWorld.cpp b/source/cWorld.cpp
index 501f78332..0b1ee7010 100644
--- a/source/cWorld.cpp
+++ b/source/cWorld.cpp
@@ -415,8 +415,8 @@ void cWorld::Tick(float a_Dt)
{
LOG("Destroy that entity! %i", (*itr)->GetUniqueID() );
cEntity* RemoveMe = *itr;
- itr++;
- AddToRemoveEntityQueue( *RemoveMe );
+ itr = m_pState->AllEntities.erase( itr );
+ m_pState->RemoveEntityQueue.push_back( RemoveMe );
continue;
}
(*itr)->Tick(a_Dt);