summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-09-28 13:05:53 +0200
committerJohan Helsing <johan.helsing@qt.io>2018-10-01 07:32:05 +0000
commitd52e86e6f9bfde48b473dbe9d08e325d45388254 (patch)
treedf1214c59e66c83ccc5780a58083c1e269345a28
parent55acc7bf06ff6c972f33acb6a8a24075d9e178c3 (diff)
Compositor: Fix crash after surface destruction
Fixes a crash due to dangling pointer dereference in QWaylandQuickItem::inputMethodQuery. Change-Id: Id379779f23221e7de17423f75c3d78d7e794b7b9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
-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 51b41c9f..3d710d71 100644
--- a/src/compositor/compositor_api/qwaylandquickitem_p.h
+++ b/src/compositor/compositor_api/qwaylandquickitem_p.h
@@ -161,7 +161,7 @@ public:
static QMutex *mutex;
QScopedPointer<QWaylandView> view;
- QWaylandSurface *oldSurface = nullptr;
+ QPointer<QWaylandSurface> oldSurface;
mutable QWaylandSurfaceTextureProvider *provider = nullptr;
bool paintEnabled = true;
bool touchEventsEnabled = true;