From 756abc0341756b7b6cac1cf49712cc85a0717dc4 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 18 Feb 2014 16:47:21 -0800 Subject: [PATCH] Add an assertion to prevent MainWindow from being recreated Signed-off-by: Thiago Macieira Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 42b07fbd8..7609bffcf 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -46,6 +46,7 @@ MainWindow::MainWindow() : QMainWindow(), helpView(0), state(VIEWALL) { + Q_ASSERT_X(m_Instance == NULL, "MainWindow", "MainWindow recreated!"); m_Instance = this; ui.setupUi(this); setWindowIcon(QIcon(":subsurface-icon"));