diff --git a/src/AIModel/AIManager.cxx b/src/AIModel/AIManager.cxx index 4b128e1c1..84f22ebf1 100644 --- a/src/AIModel/AIManager.cxx +++ b/src/AIModel/AIManager.cxx @@ -62,7 +62,7 @@ FGAIManager::~FGAIManager() { ModelVecIterator i = loadedModels.begin(); while (i != loadedModels.end()) { - i->getModelId()->deRef(); + ssgDeRefDelete(i->getModelId()); ++i; } }