From 49ea0fc16a499514ebc0c254a983e86bcda88dd6 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Fri, 28 Sep 2018 13:05:53 +0200 Subject: Compositor: Fix crash after surface destruction Fixes a crash due to dangling pointer dereference in QWaylandQuickItem::inputMethodQuery. Fixes: QTBUG-71745 Change-Id: Id379779f23221e7de17423f75c3d78d7e794b7b9 Reviewed-by: Paul Olav Tvete (cherry picked from commit d52e86e6f9bfde48b473dbe9d08e325d45388254) Reviewed-by: Andreas Cord-Landwehr --- src/compositor/compositor_api/qwaylandquickitem_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compositor/compositor_api/qwaylandquickitem_p.h b/src/compositor/compositor_api/qwaylandquickitem_p.h index f926d55e8..28b8732d3 100644 --- a/src/compositor/compositor_api/qwaylandquickitem_p.h +++ b/src/compositor/compositor_api/qwaylandquickitem_p.h @@ -154,7 +154,7 @@ public: static QMutex *mutex; QScopedPointer view; - QWaylandSurface *oldSurface = nullptr; + QPointer oldSurface; mutable QWaylandSurfaceTextureProvider *provider = nullptr; bool paintEnabled = true; bool touchEventsEnabled = true; -- cgit v1.2.3