From 4cf3d9ff5fd3ba9bfe513dd8d37b7d38715aa19f Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 15 Sep 2015 09:46:32 +0200 Subject: [PATCH] Check for valid bounding boxes before testing for intersection --- ApplicationCode/ProjectDataModel/RimView.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ApplicationCode/ProjectDataModel/RimView.cpp b/ApplicationCode/ProjectDataModel/RimView.cpp index f12838b68c..c11be75300 100644 --- a/ApplicationCode/ProjectDataModel/RimView.cpp +++ b/ApplicationCode/ProjectDataModel/RimView.cpp @@ -698,6 +698,8 @@ void RimView::setScaleZAndUpdate(double scaleZ) //-------------------------------------------------------------------------------------------------- bool RimView::isBoundingBoxesOverlappingOrClose(const cvf::BoundingBox& sourceBB, const cvf::BoundingBox& destBB) { + if (!sourceBB.isValid() || !destBB.isValid()) return false; + if (sourceBB.intersects(destBB)) return true; double largestExtent = sourceBB.extent().length();