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:
parent
226b55893d
commit
756abc0341
@ -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"));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user