]> git.mxchange.org Git - flightgear.git/commitdiff
Reset: AIbase, drop references
authorJames Turner <zakalawe@mac.com>
Sun, 6 Oct 2013 16:37:37 +0000 (17:37 +0100)
committerJames Turner <zakalawe@mac.com>
Sat, 16 Nov 2013 12:10:53 +0000 (12:10 +0000)
src/AIModel/AIBase.cxx

index 0f371c45478458e875f23dc22e91c2c7dad13f34..b443d3b0826ed38b1e306e8c931f946bac3ee548 100644 (file)
@@ -209,8 +209,10 @@ FGAIBase::removeModel()
         osg::ref_ptr<osg::Object> temp = _model.get();
         pSceneryManager->get_scene_graph()->removeChild(aip.getSceneGraph());
         // withdraw from SGModelPlacement and drop own reference (unref)
-        aip.init( 0 );
+        aip.clear();
+        _modeldata = 0;
         _model = 0;
+        
         // pass it on to the pager, to be be deleted in the pager thread
         pSceneryManager->getPager()->queueDeleteRequest(temp);
     }