diff options
author | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2015-09-25 10:07:34 +0300 |
---|---|---|
committer | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2015-09-25 11:33:02 +0000 |
commit | cf91dd10ff02916bace9281b0bfce02933e92814 (patch) | |
tree | dc887782126f8b4f0404c227c364d66b226a947c | |
parent | 10fd51a3e69a0a2ee6b8cd151fa6c847f684253c (diff) | |
download | qtwayland-cf91dd10ff02916bace9281b0bfce02933e92814.tar.gz |
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>
-rw-r--r-- | src/client/qwaylanddisplay.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index f197b378..0bea9af6 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -194,6 +194,8 @@ void QWaylandDisplay::blockingReadEvents() void QWaylandDisplay::exitWithError() { + mEventThread->quit(); + mEventThread->wait(); ::exit(1); } |