From: nds Date: Thu, 21 Apr 2016 04:55:09 +0000 (+0300) Subject: #1419 Fatal error when edit Vertex: fix X-Git-Tag: V_2.3.0~166 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c9182e4f5f7eaa09f58566e255946d240347cbad;p=modules%2Fshaper.git #1419 Fatal error when edit Vertex: fix --- diff --git a/src/ModuleBase/ModuleBase_FilterValidated.cpp b/src/ModuleBase/ModuleBase_FilterValidated.cpp index 3d57d9f18..c977072a8 100644 --- a/src/ModuleBase/ModuleBase_FilterValidated.cpp +++ b/src/ModuleBase/ModuleBase_FilterValidated.cpp @@ -27,15 +27,18 @@ Standard_Boolean ModuleBase_FilterValidated::IsOk(const Handle(SelectMgr_EntityO ModuleBase_ModelWidget* aCurrentWidget = aPanel->preselectionWidget(); if (!aCurrentWidget) aCurrentWidget = myWorkshop->module()->activeWidget(); - ModuleBase_WidgetValidated* aWidgetValidated = dynamic_cast - (aCurrentWidget); - ModuleBase_ViewerPrsPtr aPrs(new ModuleBase_ViewerPrs()); - myWorkshop->selection()->fillPresentation(aPrs, theOwner); - if (aWidgetValidated) - aValid = !aWidgetValidated || aWidgetValidated->isValidSelection(aPrs); - else if (aCurrentWidget->widgetValidator()) { - ModuleBase_WidgetValidator* aWidgetValidator = aCurrentWidget->widgetValidator(); - aValid = aWidgetValidator->isValidSelection(aPrs); + if (aCurrentWidget) { + ModuleBase_ViewerPrsPtr aPrs(new ModuleBase_ViewerPrs()); + myWorkshop->selection()->fillPresentation(aPrs, theOwner); + ModuleBase_WidgetValidated* aWidgetValidated = dynamic_cast + (aCurrentWidget); + if (aWidgetValidated) + aValid = !aWidgetValidated || aWidgetValidated->isValidSelection(aPrs); + else{ + ModuleBase_WidgetValidator* aWidgetValidator = aCurrentWidget->widgetValidator(); + if (aWidgetValidator) + aValid = aWidgetValidator->isValidSelection(aPrs); + } } }