From 49ef8c6f5564f9f837a286c5dd6b0b3a8a0b3c4e Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 29 Jun 2018 16:15:43 +0200 Subject: [PATCH] Robustness : Always return valid displayModelOffset --- ApplicationCode/ProjectDataModel/RimGeoMechCase.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechCase.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechCase.cpp index 71650bcd75..d03f1384ea 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechCase.cpp @@ -474,7 +474,13 @@ void RimGeoMechCase::setApplyTimeFilter(bool applyTimeFilter) //-------------------------------------------------------------------------------------------------- cvf::Vec3d RimGeoMechCase::displayModelOffset() const { - return this->allCellsBoundingBox().min(); + auto bb = this->allCellsBoundingBox(); + if (bb.isValid()) + { + return this->allCellsBoundingBox().min(); + } + + return cvf::Vec3d::ZERO; } //--------------------------------------------------------------------------------------------------