]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Check that the necessary button exists
authorvsv <vsv@opencascade.com>
Mon, 15 Jan 2018 09:25:00 +0000 (12:25 +0300)
committervsv <vsv@opencascade.com>
Mon, 15 Jan 2018 09:25:00 +0000 (12:25 +0300)
src/XGUI/XGUI_PropertyPanel.cpp

index 14baecee46c909cfce6c8b5bfa5b009c9f7dd3da..562330de44746c98e839af45140ba473a8f630d3 100755 (executable)
@@ -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()