Shouldn't that bejbo_85 wrote:There's a bug in Actors::removeCell() in actors.cpp regarding the iterator usage there. You need to change the code to something liketo not invalidate the iterator. The incorrect code caused a crash on cell-change in gdb but wasn't crashing without a debugger attached.Code: Select all
for(std::map<MWWorld::Ptr, Animation*>::iterator iter = mAllActors.begin(); iter != mAllActors.end();) { if(iter->first.getCell() == store){ delete iter->second; mAllActors.erase(iter++); } else { ++iter; } }
Code: Select all
iter = mAllActors.erase(iter);