From 4220e7ac25951ae3416e24c357f62decabb9fa15 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Wed, 20 Jul 2022 15:20:38 +0200 Subject: [PATCH] wayland/tablet_v2: Keep also the pad surface in a QPointer This way we make sure that we don't explode if for some reason the surface is destroyed (e.g. it's closed). This will make it work exactly like the other references to SurfaceInterface. BUG: 456817 --- 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 334040c83b..902abe35e9 100644 --- a/src/wayland/tablet_v2_interface.cpp +++ b/src/wayland/tablet_v2_interface.cpp @@ -542,7 +542,7 @@ public: QVector m_strips; TabletPadGroupV2Interface *const m_padGroup; TabletSeatV2Interface *m_seat = nullptr; - SurfaceInterface *m_currentSurface = nullptr; + QPointer m_currentSurface; Display *const m_display; };