From e2e0897a1b40584191833af5a2190487d4fc11ea Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 29 Mar 2007 10:13:36 +0000 Subject: [PATCH] Added missing return value --- src/osgTerrain/Locator.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osgTerrain/Locator.cpp b/src/osgTerrain/Locator.cpp index b95859037..328b71460 100644 --- a/src/osgTerrain/Locator.cpp +++ b/src/osgTerrain/Locator.cpp @@ -60,6 +60,8 @@ bool Locator::computeLocalBounds(Locator& source, osg::Vec3d& bottomLeft, osg::V corners.push_back(cornerNDC); } + if (corners.empty()) return false; + for(Corners::iterator itr = corners.begin(); itr != corners.end(); @@ -70,6 +72,8 @@ bool Locator::computeLocalBounds(Locator& source, osg::Vec3d& bottomLeft, osg::V topRight.x() = osg::maximum( topRight.x(), itr->x()); topRight.y() = osg::maximum( topRight.y(), itr->y()); } + + return true; } //////////////////////////////////////////////////////////////////////////////