aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-01-26 18:39:46 +0100
committerGravatar Jan Mulder <jlmulder@xs4all.nl>2018-01-31 14:47:26 +0100
commitdf81a39aa5d10fd12928a1bef7fdf31e0050e439 (patch)
treeef21802d3ea4d598b18ed8d243546fbf9d979013 /desktop-widgets/mainwindow.cpp
parenta25f54e3c29a936bb1bbfa66fa610c31c9b55808 (diff)
downloadsubsurface-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>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp4
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(),