From 6e1a23b124d6316096366543c503a8b5489f2f39 Mon Sep 17 00:00:00 2001 From: azv Date: Mon, 6 May 2019 14:42:01 +0300 Subject: [PATCH] Fix a crash. --- src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.39.2