diff --git a/MantidQt/CustomInterfaces/src/EnggDiffraction/EnggDiffractionViewQtGUI.cpp b/MantidQt/CustomInterfaces/src/EnggDiffraction/EnggDiffractionViewQtGUI.cpp index 4212facebb646eb5d829dfda6ff8f5ab99a8089f..bb815146a0476f3a677e6aa416c91d41f08aaa14 100644 --- a/MantidQt/CustomInterfaces/src/EnggDiffraction/EnggDiffractionViewQtGUI.cpp +++ b/MantidQt/CustomInterfaces/src/EnggDiffraction/EnggDiffractionViewQtGUI.cpp @@ -331,8 +331,10 @@ void EnggDiffractionViewQtGUI::doSetupGeneralWidgets() { connect(m_ui.pushButton_help, SIGNAL(released()), this, SLOT(openHelpWin())); // note connection to the parent window, otherwise an empty frame window // may remain open and visible after this close - connect(m_ui.pushButton_close, SIGNAL(released()), this->parent(), - SLOT(close())); + if(this->parent()) { + connect(m_ui.pushButton_close, SIGNAL(released()), this->parent(), + SLOT(close())); + } connect(m_ui.lineEdit_RBNumber, SIGNAL(editingFinished()), this, SLOT(RBNumberChanged()));