diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-01-26 18:39:46 +0100 |
---|---|---|
committer | Jan Mulder <jlmulder@xs4all.nl> | 2018-01-31 14:47:26 +0100 |
commit | df81a39aa5d10fd12928a1bef7fdf31e0050e439 (patch) | |
tree | ef21802d3ea4d598b18ed8d243546fbf9d979013 | |
parent | a25f54e3c29a936bb1bbfa66fa610c31c9b55808 (diff) | |
download | subsurface-df81a39aa5d10fd12928a1bef7fdf31e0050e439.tar.gz |
Remove unnecessary check for MainWindow instance
The error-callback is installed in the MainWindow constructor.
Therefore, in the error-callback the existence of the MainWindow
instance is guaranteed.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 7fa12c524..3c70f73f4 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -91,9 +91,7 @@ MainWindow *MainWindow::m_Instance = NULL; extern "C" void showErrorFromC() { - MainWindow *mainwindow = MainWindow::instance(); - if (mainwindow) - emit mainwindow->showError(get_error_string()); + emit MainWindow::instance()->showError(get_error_string()); } MainWindow::MainWindow() : QMainWindow(), |