From: vsv Date: Tue, 29 Apr 2014 14:14:15 +0000 (+0400) Subject: Avoid crash when nested key is NULL X-Git-Tag: V_0.2~103 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8eafb2ce697157aa0c1842b51c538ee39adead56;p=modules%2Fshaper.git Avoid crash when nested key is NULL --- diff --git a/src/XGUI/XGUI_ActionsMgr.cpp b/src/XGUI/XGUI_ActionsMgr.cpp index 51efba533..6eac9883a 100644 --- a/src/XGUI/XGUI_ActionsMgr.cpp +++ b/src/XGUI/XGUI_ActionsMgr.cpp @@ -91,6 +91,7 @@ void XGUI_ActionsMgr::restoreCommandState() void XGUI_ActionsMgr::setNestedActionsEnabled(bool isEnabled) { foreach(QString eachKey, myNestedActions) { - myActions[eachKey]->setEnabled(isEnabled); + if (myActions.contains(eachKey)) + myActions[eachKey]->setEnabled(isEnabled); } }