From: vsv Date: Mon, 15 Jan 2018 09:25:00 +0000 (+0300) Subject: Check that the necessary button exists X-Git-Tag: V_3.0.0RC1~39 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cb41a173cc1964d1c1a0f529e90c1b8cd6effe59;p=modules%2Fshaper.git Check that the necessary button exists --- diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index 14baecee4..562330de4 100755 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -567,9 +567,11 @@ void XGUI_PropertyPanel::setupActions(XGUI_ActionsMgr* theMgr) } // This code is necessary for remembering of user choice in property panel QToolButton* aBtn = findButton(PROP_PANEL_OK); - connect(aBtn->defaultAction(), SIGNAL(triggered(bool)), this, SLOT(onAcceptData())); + if (aBtn) + connect(aBtn->defaultAction(), SIGNAL(triggered(bool)), this, SLOT(onAcceptData())); aBtn = findButton(PROP_PANEL_OK_PLUS); - connect(aBtn->defaultAction(), SIGNAL(triggered(bool)), this, SLOT(onAcceptData())); + if (aBtn) + connect(aBtn->defaultAction(), SIGNAL(triggered(bool)), this, SLOT(onAcceptData())); } void XGUI_PropertyPanel::onAcceptData()