summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-01-14 01:46:19 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-01-14 01:46:19 +0100
commit7994c4141367eb5f0128d2bbc2ab9abe96f00a2d (patch)
treeff009d2bea3388b84ac7a1c41150a90ff57884dc /gui
parenta5aa228ca342edc6fb85c30dc83741dfb333a7f6 (diff)
gui/main-window: don't crash with no tray
Diffstat (limited to 'gui')
-rw-r--r--gui/main-window.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gui/main-window.cpp b/gui/main-window.cpp
index 95f1cf46..f4e08211 100644
--- a/gui/main-window.cpp
+++ b/gui/main-window.cpp
@@ -704,7 +704,8 @@ void main_window::show_mapping_window()
void main_window::exit(int status)
{
QApplication::setQuitOnLastWindowClosed(true);
- tray->hide();
+ if (tray)
+ tray->hide();
tray = nullptr;
close();
QApplication::exit(status);