diff --git a/src/osgGA/NodeTrackerManipulator.cpp b/src/osgGA/NodeTrackerManipulator.cpp index ef3d10e9d..077dd7ee6 100644 --- a/src/osgGA/NodeTrackerManipulator.cpp +++ b/src/osgGA/NodeTrackerManipulator.cpp @@ -167,7 +167,7 @@ void NodeTrackerManipulator::computeNodeCenterAndRotation(osg::Vec3d& nodeCenter computeNodeWorldToLocal(worldToLocal); osg::NodePath nodePath; - if (_trackNodePath.getNodePath(nodePath)) + if (_trackNodePath.getNodePath(nodePath) && !nodePath.empty()) nodeCenter = osg::Vec3d(nodePath.back()->getBound().center())*localToWorld; else nodeCenter = osg::Vec3d(0.0f,0.0f,0.0f)*localToWorld;