Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / 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();
       }