Fixed crash when AntiSquish node is the root of the scene graph.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14840 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -98,8 +98,10 @@ bool AntiSquish::computeUnSquishedMatrix(osg::Matrix& unsquished) const
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock( _cacheLock );
|
||||
|
||||
osg::NodePathList nodePaths = getParentalNodePaths();
|
||||
osg::NodePath np;
|
||||
if (!nodePaths.empty()) np = nodePaths.front();
|
||||
if (nodePaths.empty()) return false;
|
||||
|
||||
osg::NodePath np = nodePaths.front();
|
||||
if (np.empty()) return false;
|
||||
|
||||
// Remove the last node which is the anti squish node itself.
|
||||
np.pop_back();
|
||||
|
||||
Reference in New Issue
Block a user