Fix a segfault when the wayland connection is broken
When calling ::exit() the socket notifier in the events thread may still fire before the process actually exits, using objects that are being destroyed and resulting in a segfault. Stop the events thread before calling ::exit(). Change-Id: I187762da2a7efa83db1e62b0e28dfab89f478c7d Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
This commit is contained in:
parent
eb1fe81b7d
commit
a7ed723edb
@ -194,6 +194,8 @@ void QWaylandDisplay::blockingReadEvents()
|
||||
|
||||
void QWaylandDisplay::exitWithError()
|
||||
{
|
||||
mEventThread->quit();
|
||||
mEventThread->wait();
|
||||
::exit(1);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user