]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix a crash.
authorazv <azv@opencascade.com>
Mon, 6 May 2019 11:42:01 +0000 (14:42 +0300)
committervsv <vsv@opencascade.com>
Mon, 3 Jun 2019 10:32:02 +0000 (13:32 +0300)
src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp

index 16723a035f99a7d578cdc981d78feee15031fc49..207e4f3aa807ce4c1b861cd4f76df85927b0a26c 100644 (file)
@@ -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<ModelAPI_ResultBody>(theResult);
       for (int i = 0; aResult && i < aResult->numberOfSubs(); ++i) {