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:
parent
cd9a0afafa
commit
56c2e158ee
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue