diff options
author | Thiago Macieira <thiago@macieira.org> | 2014-02-18 16:47:21 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-18 16:49:04 -0800 |
commit | 756abc0341756b7b6cac1cf49712cc85a0717dc4 (patch) | |
tree | 3ec618f67132867877da383c7eac4deed1c8c198 /qt-ui/mainwindow.cpp | |
parent | 226b55893d78a3057c97e9d78fef450688631520 (diff) | |
download | subsurface-756abc0341756b7b6cac1cf49712cc85a0717dc4.tar.gz |
Add an assertion to prevent MainWindow from being recreated
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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")); |