Harald JOHNSEN:
"the model is deref'd and deleted when the refcount is null *but* it is still referenced in the ai model list, so next time you ask for it you will have a reference on something deleted"
This commit is contained in:
parent
cd8b6459cb
commit
853d19e09b
1 changed files with 2 additions and 0 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue