Mathias Froehlich: fix refcounting problem that caused submodel crashes
This commit is contained in:
parent
7e25bfab4c
commit
13945c6cd4
1 changed files with 4 additions and 1 deletions
|
@ -160,7 +160,6 @@ ssgBranch * FGAIBase::load3DModel(const string& fg_root,
|
|||
prop_root,
|
||||
sim_time_sec);
|
||||
manager->setModel(path, model);
|
||||
model->ref();
|
||||
}
|
||||
//else
|
||||
// {
|
||||
|
@ -169,6 +168,10 @@ ssgBranch * FGAIBase::load3DModel(const string& fg_root,
|
|||
// aip.setVisible(false);
|
||||
// globals->get_scenery()->get_scene_graph()->addKid(aip.getSceneGraph());
|
||||
// do some setModel stuff.
|
||||
|
||||
if (model)
|
||||
model->ref();
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue