Fix for debug crash on windows

This commit is contained in:
Alexander "Ace" Olofsson 2012-02-26 22:45:17 +01:00
parent 7505c96fbb
commit be8690e333

View file

@ -99,12 +99,14 @@ void Actors::removeCell(MWWorld::Ptr::CellStore* store){
mRend.getScene()->destroySceneNode(base);
base = 0;
}
for(std::map<MWWorld::Ptr, Animation*>::iterator iter = mAllActors.begin(); iter != mAllActors.end(); iter++)
for(std::map<MWWorld::Ptr, Animation*>::iterator iter = mAllActors.begin(); iter != mAllActors.end(); )
{
if(iter->first.getCell() == store){
delete iter->second;
mAllActors.erase(iter);
iter = mAllActors.erase(iter);
}
else
++iter;
}
}