blob: 50d1314cf761d4562ba0f17ba1d23b406ebbcc5b (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
From 5f5bea1648590f24f11ce232eb78112953a4d20e Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
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/server/tablet_v2_interface.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/server/tablet_v2_interface.cpp b/src/server/tablet_v2_interface.cpp
index 59a4b2fb..8af80603 100644
--- a/src/server/tablet_v2_interface.cpp
+++ b/src/server/tablet_v2_interface.cpp
@@ -91,7 +91,7 @@ public:
TabletCursorV2 *const q;
quint32 m_serial = 0;
- SurfaceInterface *m_surface = nullptr;
+ QPointer<SurfaceInterface> m_surface;
QPoint m_hotspot;
};
--
GitLab
|