diff --git a/src/AIModel/AIBase.cxx b/src/AIModel/AIBase.cxx index d66de0300..e71b2346f 100644 --- a/src/AIModel/AIBase.cxx +++ b/src/AIModel/AIBase.cxx @@ -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; } diff --git a/src/AIModel/AIBase.hxx b/src/AIModel/AIBase.hxx index 14467a236..f24ebd86a 100644 --- a/src/AIModel/AIBase.hxx +++ b/src/AIModel/AIBase.hxx @@ -119,7 +119,7 @@ public: protected: - SGPropertyNode *props; + SGPropertyNode_ptr props; FGAIManager* manager; // these describe the model's actual state