diff options
Diffstat (limited to 'subsurface-desktop-helper.cpp')
-rw-r--r-- | subsurface-desktop-helper.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/subsurface-desktop-helper.cpp b/subsurface-desktop-helper.cpp index d2c4aeebd..e902a5946 100644 --- a/subsurface-desktop-helper.cpp +++ b/subsurface-desktop-helper.cpp @@ -14,27 +14,25 @@ #include "core/qt-gui.h" -static MainWindow *window = NULL; - void init_ui() { init_qt_late(); PluginManager::instance().loadPlugins(); - window = new MainWindow(); + MainWindow *window = new MainWindow(); window->setTitle(); } void run_ui() { - window->show(); + MainWindow::instance()->show(); qApp->exec(); } void exit_ui() { - delete window; + delete MainWindow::instance(); delete qApp; free((void *)existing_filename); } |