From cb41a173cc1964d1c1a0f529e90c1b8cd6effe59 Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 15 Jan 2018 12:25:00 +0300 Subject: [PATCH] Check that the necessary button exists --- src/XGUI/XGUI_PropertyPanel.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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() -- 2.39.2