]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Avoid crash when widget is null.
authornds <nds@opencascade.com>
Tue, 3 Nov 2015 10:23:13 +0000 (13:23 +0300)
committernds <nds@opencascade.com>
Tue, 3 Nov 2015 10:23:13 +0000 (13:23 +0300)
src/XGUI/XGUI_OperationMgr.cpp

index 8a9076633c1694fc1025e664191e3b14e919aa5a..05778ad7fe6a44ff89c79c4b964fc3c79e0e9736 100644 (file)
@@ -503,7 +503,7 @@ bool XGUI_OperationMgr::onKeyReleased(QKeyEvent* theEvent)
       ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel();
       ModuleBase_ModelWidget* aActiveWgt = aPanel->activeWidget();
       if (!aActiveWgt || !aActiveWgt->processEnter()) {
-        if (!myWorkshop->module()->processEnter(aActiveWgt->attributeID())) {
+        if (!myWorkshop->module()->processEnter(aActiveWgt ? aActiveWgt->attributeID() : "")) {
           ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>(currentOperation());
           if (!aFOperation || myWorkshop->module()->getFeatureError(aFOperation->feature(), false).isEmpty()) {
             emit keyEnterReleased();