From f21b6fe576b1068598d6c19fbbfd3f0659d5498d Mon Sep 17 00:00:00 2001 From: Vaxry Date: Fri, 17 May 2024 14:51:06 +0100 Subject: [PATCH] tablet: avoid null deref on an empty cursor set fixes#6116 --- src/protocols/Tablet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocols/Tablet.cpp b/src/protocols/Tablet.cpp index 7c54a116..54c55176 100644 --- a/src/protocols/Tablet.cpp +++ b/src/protocols/Tablet.cpp @@ -164,7 +164,7 @@ CTabletToolV2Resource::CTabletToolV2Resource(SP resource_, SP< if (!g_pSeatManager->state.pointerFocusResource || g_pSeatManager->state.pointerFocusResource->client() != r->client()) return; - g_pInputManager->processMouseRequest(CSeatManager::SSetCursorEvent{wlr_surface_from_resource(surf), {hot_x, hot_y}}); + g_pInputManager->processMouseRequest(CSeatManager::SSetCursorEvent{surf ? wlr_surface_from_resource(surf) : nullptr, {hot_x, hot_y}}); }); }