1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-26 02:38:04 +00:00

Hold a ref to the intersection visitor's view if possible

This commit is contained in:
scrawl 2017-03-12 19:47:59 +01:00
parent 59bf100907
commit db00d47ca2

View File

@ -143,7 +143,7 @@ ViewData* QuadTreeNode::getView(osg::NodeVisitor &nv)
}
else // INTERSECTION_VISITOR
{
return mViewDataMap->getViewData(&nv, false);
return mViewDataMap->getViewData(&nv, (nv.referenceCount() > 0)); // if no referenceCount, the visitor was allocated on the stack
}
}