]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix crash.
authordbv <dbv@opencascade.com>
Wed, 7 Nov 2018 09:39:10 +0000 (12:39 +0300)
committermpv <mpv@opencascade.com>
Mon, 19 Nov 2018 08:45:52 +0000 (11:45 +0300)
src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp

index ceb01e79336a84f291aa644980e52435afb6d828..8944dd36273bc3346664f98ab55f0d3c33f15194 100644 (file)
@@ -148,7 +148,7 @@ bool FeaturesPlugin_Extrusion::makeExtrusions(ListOfShape& theBaseShapes,
       if(!aToShape.get() && aSelection->context().get()) {
         aToShape = aSelection->context()->shape();
       }
-      if (aToShape->isCompound()) {
+      if (aToShape.get() && aToShape->isCompound()) {
         GeomAPI_ShapeIterator anIt(aToShape);
         aToShape = anIt.current();
       }
@@ -159,7 +159,7 @@ bool FeaturesPlugin_Extrusion::makeExtrusions(ListOfShape& theBaseShapes,
       if(!aFromShape.get() && aSelection->context().get()) {
         aFromShape = aSelection->context()->shape();
       }
-      if (aFromShape->isCompound()) {
+      if (aFromShape.get() && aFromShape->isCompound()) {
         GeomAPI_ShapeIterator anIt(aFromShape);
         aFromShape = anIt.current();
       }