From: azv Date: Mon, 6 May 2019 11:42:01 +0000 (+0300) Subject: Fix a crash. X-Git-Tag: VEDF2019Lot4~139^2~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6e1a23b124d6316096366543c503a8b5489f2f39;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) {