]> git.mxchange.org Git - simgear.git/commitdiff
fix a coredump situation, discovered by Melchior.
authorehofman <ehofman>
Wed, 8 Jun 2005 14:07:53 +0000 (14:07 +0000)
committerehofman <ehofman>
Wed, 8 Jun 2005 14:07:53 +0000 (14:07 +0000)
simgear/props/props.cxx

index a46ecfc8f88215bdb75f2be347f03d707ecefe87..dd8cb0c01fea7436eb50bf4be6bff8d733f0f48d 100644 (file)
@@ -927,7 +927,8 @@ SGPropertyNode::removeChild (const char * name, int index, bool keep)
     if (keep) {
       _removedChildren.push_back(node);
     }
-    _path_cache->erase(name); // EMH - TODO: Take "index" into account!
+    if (_path_cache)
+       _path_cache->erase(name); // EMH - TODO: Take "index" into account!
     node->setAttribute(REMOVED, true);
     node->clearValue();
     ret = node;