mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
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
1 changed files with 1 additions and 0 deletions
|
@ -46,6 +46,7 @@ MainWindow::MainWindow() : QMainWindow(),
|
||||||
helpView(0),
|
helpView(0),
|
||||||
state(VIEWALL)
|
state(VIEWALL)
|
||||||
{
|
{
|
||||||
|
Q_ASSERT_X(m_Instance == NULL, "MainWindow", "MainWindow recreated!");
|
||||||
m_Instance = this;
|
m_Instance = this;
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
setWindowIcon(QIcon(":subsurface-icon"));
|
setWindowIcon(QIcon(":subsurface-icon"));
|
||||||
|
|
Loading…
Reference in a new issue