Changed to use ref_ptr<> for scene model to avoid crash

This commit is contained in:
Robert Osfield
2009-01-12 13:12:04 +00:00
parent ef1d205a2e
commit c2e7eacc06

View File

@@ -2284,7 +2284,7 @@ int main( int argc, char **argv )
}
// create a model from the images.
osg::Node* rootNode = 0;
osg::ref_ptr<osg::Node> rootNode = 0;
if (useOsgVolume)
{
@@ -2370,7 +2370,7 @@ int main( int argc, char **argv )
{
// set the scene to render
viewer.setSceneData(rootNode);
viewer.setSceneData(rootNode.get());
// the the viewers main frame loop
viewer.run();