From cf91dd10ff02916bace9281b0bfce02933e92814 Mon Sep 17 00:00:00 2001 From: Giulio Camuffo Date: Fri, 25 Sep 2015 10:07:34 +0300 Subject: 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 --- src/client/qwaylanddisplay.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/client/qwaylanddisplay.cpp') diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index f197b3788..0bea9af65 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); } -- cgit v1.2.3