From 56c2e158ee4e8f78aed45d2aa41562961ec28d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 11 Jul 2016 14:34:24 +0200 Subject: [PATCH] Call QCoreApplication::exit instead of stdlib exit to terminate if platform fails Summary: We need to properly tear down the application - this can be achieved through QCoreApplication::exit. Otherwise there is a chance that the cleanup handling crashes. Reviewers: #kwin, #plasma_on_wayland Subscribers: plasma-devel, kwin Tags: #plasma_on_wayland, #kwin Differential Revision: https://phabricator.kde.org/D2136 --- main_wayland.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main_wayland.cpp b/main_wayland.cpp index 6f74ba392f..ecb649bc03 100644 --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -135,7 +135,7 @@ void ApplicationWayland::createBackend() connect(platform(), &Platform::initFailed, this, [] () { std::cerr << "FATAL ERROR: backend failed to initialize, exiting now" << std::endl; - ::exit(1); + QCoreApplication::exit(1); } ); platform()->init();