From ee1ea077ba46abeb62574332744ccc9147f0e7df Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 10 Jan 2022 13:17:32 +0200 Subject: [PATCH] Store surface object in tablet cursor using QPointer The SurfaceInterface can get destroyed and TabletCursorV2 may return a dangling pointer. BUG: 446255 --- src/wayland/tablet_v2_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland/tablet_v2_interface.cpp b/src/wayland/tablet_v2_interface.cpp index 59a4b2fb28..8af806039b 100644 --- a/src/wayland/tablet_v2_interface.cpp +++ b/src/wayland/tablet_v2_interface.cpp @@ -91,7 +91,7 @@ public: TabletCursorV2 *const q; quint32 m_serial = 0; - SurfaceInterface *m_surface = nullptr; + QPointer m_surface; QPoint m_hotspot; };