]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for crash on Box creation
authorvsv <vitaly.smetannikov@opencascade.com>
Thu, 26 May 2016 08:43:11 +0000 (11:43 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Thu, 26 May 2016 08:43:11 +0000 (11:43 +0300)
src/PartSet/PartSet_Module.cpp

index 3235693f3903b17929851486a000e5d4809de06f..1df95bb8a63115fecae382f4728b8fe94dccd3cc 100755 (executable)
@@ -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<ModuleBase_WidgetSelector*>(aModelWgt);
-          if (aWgtSelector) {
-            return aWgtSelector->isFilterActivated();
+          if (aPropPanel) {
+            ModuleBase_ModelWidget* aModelWgt = aPropPanel->activeWidget();
+            ModuleBase_WidgetSelector* aWgtSelector = dynamic_cast<ModuleBase_WidgetSelector*>(aModelWgt);
+            if (aWgtSelector) {
+              return aWgtSelector->isFilterActivated();
+            } else
+              return true;
           } else
-            return true;
+            return false;
         } else
           return false;
     }