summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-09-28 13:05:53 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2018-11-16 07:30:18 +0000
commit49ea0fc16a499514ebc0c254a983e86bcda88dd6 (patch)
tree8ebf7fa2909a069666f2a8046eb600baa6254cec
parentdccec9b282ae15fa65fd61698dd1cb47325e5c8e (diff)
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 <paul.tvete@qt.io> (cherry picked from commit d52e86e6f9bfde48b473dbe9d08e325d45388254) Reviewed-by: Andreas Cord-Landwehr <andreas.cord-landwehr@claas.com>
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compositor/compositor_api/qwaylandquickitem_p.h b/src/compositor/compositor_api/qwaylandquickitem_p.h
index f926d55e..28b8732d 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<QWaylandView> view;
- QWaylandSurface *oldSurface = nullptr;
+ QPointer<QWaylandSurface> oldSurface;
mutable QWaylandSurfaceTextureProvider *provider = nullptr;
bool paintEnabled = true;
bool touchEventsEnabled = true;