]> git.mxchange.org Git - simgear.git/commitdiff
Canvas: clear elements in shutdown()
authorJames Turner <zakalawe@mac.com>
Fri, 6 Dec 2013 18:14:48 +0000 (18:14 +0000)
committerJames Turner <zakalawe@mac.com>
Fri, 6 Dec 2013 18:14:48 +0000 (18:14 +0000)
- without this change, elements aren't un-ref-ed and hence destroyed
until the actual dtor runs, which is too late (other systems may be
destroyed already)

simgear/props/PropertyBasedMgr.cxx

index 621d11db67efd2401ad43c049d22e59505917261..4091da9fa715c60b57681c218122e8981b183813 100644 (file)
@@ -37,6 +37,7 @@ namespace simgear
   void PropertyBasedMgr::shutdown()
   {
     _props->removeChangeListener(this);
+    _elements.clear();
   }
 
   //----------------------------------------------------------------------------