From: nds Date: Tue, 3 Nov 2015 10:23:13 +0000 (+0300) Subject: Avoid crash when widget is null. X-Git-Tag: V_2.0.0_alfa1~6^2~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7fe754a6993eea325aee55c06816aa88311128c3;p=modules%2Fshaper.git Avoid crash when widget is null. --- diff --git a/src/XGUI/XGUI_OperationMgr.cpp b/src/XGUI/XGUI_OperationMgr.cpp index 8a9076633..05778ad7f 100644 --- a/src/XGUI/XGUI_OperationMgr.cpp +++ b/src/XGUI/XGUI_OperationMgr.cpp @@ -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(currentOperation()); if (!aFOperation || myWorkshop->module()->getFeatureError(aFOperation->feature(), false).isEmpty()) { emit keyEnterReleased();