From 6139d67f405efbc26673d88a9afbae21a41ead5a Mon Sep 17 00:00:00 2001 From: azv Date: Mon, 17 Sep 2018 07:43:05 +0300 Subject: [PATCH] Issue #2645: SIGSEGV when creating a fillet Fix crash in fillet on pre-selected parameter feature. --- src/FeaturesPlugin/FeaturesPlugin_Validators.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp b/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp index e28008720..b991e38f0 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp @@ -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."; -- 2.39.2