From: vsv Date: Thu, 26 May 2016 08:43:11 +0000 (+0300) Subject: Fix for crash on Box creation X-Git-Tag: V_2.3.1~56 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c2d5bdf20467d54d22974358bf98c2450ad32a8f;p=modules%2Fshaper.git Fix for crash on Box creation --- diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 3235693f3..1df95bb8a 100755 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -1332,12 +1332,15 @@ bool PartSet_Module::canActivateSelectionMode(const Handle(AIS_InteractiveObject ModuleBase_Operation* anOperation = myWorkshop->currentOperation(); if (anOperation) { ModuleBase_IPropertyPanel* aPropPanel = anOperation->propertyPanel(); - ModuleBase_ModelWidget* aModelWgt = aPropPanel->activeWidget(); - ModuleBase_WidgetSelector* aWgtSelector = dynamic_cast(aModelWgt); - if (aWgtSelector) { - return aWgtSelector->isFilterActivated(); + if (aPropPanel) { + ModuleBase_ModelWidget* aModelWgt = aPropPanel->activeWidget(); + ModuleBase_WidgetSelector* aWgtSelector = dynamic_cast(aModelWgt); + if (aWgtSelector) { + return aWgtSelector->isFilterActivated(); + } else + return true; } else - return true; + return false; } else return false; }