1
0
Fork 0

Mathias Froehlich: fix refcounting problem that caused submodel crashes

This commit is contained in:
mfranz 2005-10-18 18:01:43 +00:00
parent 7e25bfab4c
commit 13945c6cd4

View file

@ -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;
}