From 7385948056da7eb6f87cda4c9b3a946c50094c08 Mon Sep 17 00:00:00 2001 From: Jason Hooks Date: Sat, 19 Nov 2011 20:22:56 -0500 Subject: [PATCH] Yet another crash fix --- apps/openmw/mwrender/objects.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/openmw/mwrender/objects.cpp b/apps/openmw/mwrender/objects.cpp index e49e448aec..ade1127af1 100644 --- a/apps/openmw/mwrender/objects.cpp +++ b/apps/openmw/mwrender/objects.cpp @@ -150,6 +150,7 @@ void Objects::removeCell(MWWorld::Ptr::CellStore* store){ { Ogre::SceneNode* base = mCellSceneNodes[store]; base->removeAndDestroyAllChildren(); + mCellSceneNodes.erase(store); mRend.getScene()->destroySceneNode(base); base = 0; } @@ -158,6 +159,7 @@ void Objects::removeCell(MWWorld::Ptr::CellStore* store){ if(mSG.find(store) != mSG.end()) { Ogre::StaticGeometry* sg = mSG[store]; + mSG.erase(store); mRend.getScene()->destroyStaticGeometry (sg); sg = 0; }