Store surface object in tablet cursor using QPointer

The SurfaceInterface can get destroyed and TabletCursorV2 may return a
dangling pointer.

BUG: 446255
This commit is contained in:
Vlad Zahorodnii 2022-01-10 13:17:32 +02:00
parent 49aadee2a9
commit ee1ea077ba

View file

@ -91,7 +91,7 @@ public:
TabletCursorV2 *const q; TabletCursorV2 *const q;
quint32 m_serial = 0; quint32 m_serial = 0;
SurfaceInterface *m_surface = nullptr; QPointer<SurfaceInterface> m_surface;
QPoint m_hotspot; QPoint m_hotspot;
}; };