]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIManager.cxx
allow to trigger widgets via accelerator key, which is defined via "keynum"
[flightgear.git] / src / AIModel / AIManager.cxx
index 8b7154059a1f0f2d98b6f8dcec705f365a8d5f5a..e20376516996d86bc7d44880be7ee11c5cf42fd1 100644 (file)
@@ -444,6 +444,8 @@ ssgBranch * FGAIManager::getModel(const string& path) const
 
 void FGAIManager::setModel(const string& path, ssgBranch *model)
 {
+  if (model)
+    model->ref();
   loadedModels.push_back(FGModelID(path,model));
 }