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
This commit is contained in:
Martin Gräßlin 2016-07-11 14:34:24 +02:00
parent cd9a0afafa
commit 56c2e158ee

View file

@ -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();