From: azv Date: Mon, 6 May 2019 11:42:01 +0000 (+0300) Subject: Fix a crash. X-Git-Tag: VEDF2019Lot4~101^2~85 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a938a4dcdfdc1bbbfacb3eec565aee3ce2402a2f;p=modules%2Fshaper.git Fix a crash. --- diff --git a/src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp b/src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp index 16723a035..207e4f3aa 100644 --- a/src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp +++ b/src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp @@ -131,7 +131,7 @@ namespace ModelGeomAlgo_Shape aSR.mySubshape = theSubshape; aSR.myCenterType = theCenterType; // compound subshapes from other compounds should be processed as whole results - if (aSR.mySubshape->shapeType() == GeomAPI_Shape::COMPOUND && + if (aSR.mySubshape && aSR.mySubshape->shapeType() == GeomAPI_Shape::COMPOUND && !theResult->shape()->isEqual(theSubshape)) { ResultBodyPtr aResult = std::dynamic_pointer_cast(theResult); for (int i = 0; aResult && i < aResult->numberOfSubs(); ++i) {