From 7994c4141367eb5f0128d2bbc2ab9abe96f00a2d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 14 Jan 2018 01:46:19 +0100 Subject: gui/main-window: don't crash with no tray --- gui/main-window.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3