Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / BuildPlugin / BuildPlugin_Validators.cpp
index 8c58b47772f8332b23483e73fbab521a0d87ff13..1dc69c0a38c5566aaf2b651693ef48bd452604cb 100644 (file)
@@ -279,13 +279,18 @@ bool BuildPlugin_ValidatorBaseForSolids::isValid(
   ListOfShape anOriginalShapes;
   for (int anIndex = 0; anIndex < aSelectionList->size(); ++anIndex) {
     AttributeSelectionPtr aSelection = aSelectionList->value(anIndex);
+    if (!aSelection->context().get()) {
+      theError = "Invalid selection.";
+      return false;
+    }
     GeomShapePtr aShape = aSelection->value();
     if (!aShape.get())
       aShape = aSelection->context()->shape();
     anOriginalShapes.push_back(aShape);
   }
 
-  std::shared_ptr<GeomAlgoAPI_MakeVolume> anAlgorithm(new GeomAlgoAPI_MakeVolume(anOriginalShapes));
+  std::shared_ptr<GeomAlgoAPI_MakeVolume> anAlgorithm(
+    new GeomAlgoAPI_MakeVolume(anOriginalShapes, false));
 
   if (!anAlgorithm->isDone()) {
     theError = "MakeVolume algorithm failed.";