]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix crash on changing parameters of 'galeries' model. Update model to change business...
authorazv <azv@opencascade.com>
Wed, 16 Jan 2019 06:55:32 +0000 (09:55 +0300)
committerazv <azv@opencascade.com>
Wed, 16 Jan 2019 06:55:32 +0000 (09:55 +0300)
src/FeaturesPlugin/FeaturesPlugin_Validators.cpp

index 7e0b51b932dbd5df8410c652c98c671716c5ba5d..0c9afd4a609463507fc9b7f0cd77ce6ea7a18201 100644 (file)
@@ -1345,9 +1345,12 @@ bool FeaturesPlugin_ValidatorBooleanSmashSelection::isValid(
 
     ResultPtr aContext = anAttrSelection->context();
     std::shared_ptr<GeomAPI_Shape> aShape = anAttrSelection->value();
-    GeomShapePtr aContextShape = aContext->shape();
     if (!aShape.get()) {
-      aShape = aContextShape;
+      if (!aContext.get()) {
+        theError = "Error: Empty selection.";
+        return false;
+      }
+      aShape = aContext->shape();
     }
 
     if (aShape->isSolid() || aShape->isCompSolid()) {