]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2645: SIGSEGV when creating a fillet
authorazv <azv@opencascade.com>
Mon, 17 Sep 2018 04:43:05 +0000 (07:43 +0300)
committerazv <azv@opencascade.com>
Mon, 17 Sep 2018 04:43:05 +0000 (07:43 +0300)
Fix crash in fillet on pre-selected parameter feature.

src/FeaturesPlugin/FeaturesPlugin_Validators.cpp

index e28008720d77cdd77dfd50a16a017ec601163cda..b991e38f0b58914f2463c27ba09d21f9d4d5d4b9 100644 (file)
@@ -716,6 +716,11 @@ bool FeaturesPlugin_ValidatorFilletSelection::isValid(const AttributePtr& theAtt
     ResultBodyPtr aContextOwner = ModelAPI_Tools::bodyOwner(aContext);
     GeomShapePtr anOwner = aContextOwner.get() ? aContextOwner->shape() : aContext->shape();
 
+    if (!anOwner) {
+      theError = "Error: wrong feature is selected.";
+      return false;
+    }
+
     if (anOwner->shapeType() != GeomAPI_Shape::SOLID &&
         anOwner->shapeType() != GeomAPI_Shape::COMPSOLID) {
       theError = "Error: Not all selected shapes are sub-shapes of solids.";