diff --git a/src/wayland/server/tablet_interface.cpp b/src/wayland/server/tablet_interface.cpp index 554dd1c764..b296323e09 100644 --- a/src/wayland/server/tablet_interface.cpp +++ b/src/wayland/server/tablet_interface.cpp @@ -155,6 +155,9 @@ public: wl_resource *targetResource() { + if (!m_surface) + return nullptr; + ClientConnection *client = m_surface->client(); const Resource *r = resourceMap().value(*client); return r ? r->handle : nullptr;