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>
This commit is contained in:
Thiago Macieira 2014-02-18 16:47:21 -08:00 committed by Dirk Hohndel
parent 226b55893d
commit 756abc0341

View file

@ -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"));