1
0
Fork 0

- replace one SGPropertyNode* by SGPropertyNode_ptr to avoid crash with

temporary removeChild(); should be done even after reverting; the node
  is accessed after removal
- cleanup:  if (foo) delete foo  -->  delete foo
This commit is contained in:
mfranz 2005-06-30 18:34:20 +00:00
parent 93dbac482f
commit 9f0397a720
2 changed files with 2 additions and 2 deletions

View file

@ -76,7 +76,7 @@ FGAIBase::~FGAIBase() {
// unbind();
SGPropertyNode *root = globals->get_props()->getNode("ai/models", true);
root->removeChild(_type_str.c_str(), index);
if (fp) delete fp;
delete fp;
fp = NULL;
}

View file

@ -119,7 +119,7 @@ public:
protected:
SGPropertyNode *props;
SGPropertyNode_ptr props;
FGAIManager* manager;
// these describe the model's actual state