Salome HOME
Fix for the issue #2417 : human name for a generic error
[modules/shaper.git] / src / BuildPlugin / BuildPlugin_Validators.cpp
index 8c58b47772f8332b23483e73fbab521a0d87ff13..99140d20eb5c498ab7619a9751b11fedecd0eb22 100644 (file)
@@ -279,6 +279,10 @@ 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();