1
0
Fork 0

Keep ref_ptr in FGNasalModelData (should fix #1234)

This commit is contained in:
Thomas Geymayer 2013-11-01 20:52:55 +01:00
parent 636b6ca767
commit 4c9ab24b66
2 changed files with 4 additions and 4 deletions

View file

@ -100,7 +100,7 @@ FGNasalModelData::~FGNasalModelData()
(
SG_NASAL,
SG_INFO,
"Removed model with script(s) (branch = " << _branch << ")"
"Removed model with script(s) (branch = " << _branch.get() << ")"
);
}
@ -127,7 +127,7 @@ void FGNasalModelData::load()
.method("getPose", &f_node_getPose);
}
module.set("_model", NodeRef(_branch));
module.set("_model", _branch);
naRef arg[2];
arg[0] = nasalSys->propNodeGhost(_root);
@ -163,7 +163,7 @@ void FGNasalModelData::unload()
//------------------------------------------------------------------------------
osg::Node* FGNasalModelData::getNode()
{
return _branch;
return _branch.get();
}
//------------------------------------------------------------------------------

View file

@ -67,7 +67,7 @@ private:
std::string _module, _path;
SGPropertyNode_ptr _root, _prop;
SGConstPropertyNode_ptr _load, _unload;
osg::Node *_branch;
osg::ref_ptr<osg::Node> _branch;
unsigned int _module_id;
};