Added checked against an empty _kdNodes list before commensing with intersection

This commit is contained in:
Robert Osfield
2008-08-19 17:41:55 +00:00
parent 3cec676d98
commit f930e707e8

View File

@@ -755,6 +755,8 @@ bool KdTree::build(BuildOptions& options, osg::Geometry* geometry)
bool KdTree::intersect(const osg::Vec3& start, const osg::Vec3& end, LineSegmentIntersections& intersections) const
{
if (_kdNodes.empty()) return false;
int numIntersectionsBefore = intersections.size();
IntersectKdTree intersector(*_vertices,