From bb93b3778541614ea0f4633fe283c333cbac1287 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 27 Oct 2018 11:22:29 +0200 Subject: trackmouse: avoid recursive exit --- variant/trackmouse/window.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/variant/trackmouse/window.cpp b/variant/trackmouse/window.cpp index d893b5c1..1cda0694 100644 --- a/variant/trackmouse/window.cpp +++ b/variant/trackmouse/window.cpp @@ -327,8 +327,16 @@ void main_window::set_title(const QString& game_title) void main_window::exit(int status) { + if (exiting_already) + return; + exiting_already = true; + + qDebug() << "trackmouse: saving settings on app exit"; + save_settings_timer.stop(); + mouse.b->save(); + + //close(); QApplication::setQuitOnLastWindowClosed(true); - close(); QApplication::exit(status); } -- cgit v1.2.3