- 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:
parent
93dbac482f
commit
9f0397a720
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
SGPropertyNode *props;
|
||||
SGPropertyNode_ptr props;
|
||||
FGAIManager* manager;
|
||||
|
||||
// these describe the model's actual state
|
||||
|
|
Loading…
Add table
Reference in a new issue