Keep ref_ptr in FGNasalModelData (should fix #1234)
This commit is contained in:
parent
636b6ca767
commit
4c9ab24b66
2 changed files with 4 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue