From: nds Date: Thu, 9 Jul 2015 13:09:45 +0000 (+0300) Subject: Issue #744 - Application crash after editing a parameter used in an expression X-Git-Tag: V_1.3.0~50 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d24741939099378df05801e5f620d31507fe66cf;p=modules%2Fshaper.git Issue #744 - Application crash after editing a parameter used in an expression Results with empty shape is not valid for the widget selector. --- diff --git a/src/ModuleBase/ModuleBase_WidgetValidated.cpp b/src/ModuleBase/ModuleBase_WidgetValidated.cpp index a90eadac2..aa774ca55 100644 --- a/src/ModuleBase/ModuleBase_WidgetValidated.cpp +++ b/src/ModuleBase/ModuleBase_WidgetValidated.cpp @@ -70,7 +70,8 @@ bool ModuleBase_WidgetValidated::isValidInFilters(const ModuleBase_ViewerPrs& th // creates a selection owner on the base of object shape and the object AIS object if (anOwner.IsNull() && thePrs.owner().IsNull() && thePrs.object().get()) { ResultPtr aResult = myWorkshop->selection()->getResult(thePrs); - if (aResult.get()) { + if (aResult.get() && aResult->shape().get()) { + // some results have no shape, e.g. the parameter one. So, they should not be validated GeomShapePtr aShape = aResult->shape(); const TopoDS_Shape aTDShape = aShape->impl(); Handle(AIS_InteractiveObject) anIO = myWorkshop->selection()->getIO(thePrs); @@ -78,7 +79,7 @@ bool ModuleBase_WidgetValidated::isValidInFilters(const ModuleBase_ViewerPrs& th myPresentedObject = aResult; } else - aValid = false; // only results can be filtered + aValid = false; // only results with a shape can be filtered } // checks the owner by the AIS context activated filters if (!anOwner.IsNull()) {