From: azv Date: Mon, 17 Sep 2018 04:43:05 +0000 (+0300) Subject: Issue #2645: SIGSEGV when creating a fillet X-Git-Tag: V9_2_0a1~31 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6139d67f405efbc26673d88a9afbae21a41ead5a;p=modules%2Fshaper.git Issue #2645: SIGSEGV when creating a fillet Fix crash in fillet on pre-selected parameter feature. --- 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.";