diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-05-17 14:51:06 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-05-17 14:51:06 +0100 |
| commit | f21b6fe576b1068598d6c19fbbfd3f0659d5498d (patch) | |
| tree | 6dbae2f6e60d919ae53fa1f9ee17613090284c0e /src/protocols/Tablet.cpp | |
| parent | f91431465b910b1acfc352d2425310beb34b7598 (diff) | |
tablet: avoid null deref on an empty cursor set
fixes#6116
Diffstat (limited to 'src/protocols/Tablet.cpp')
| -rw-r--r-- | src/protocols/Tablet.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<CZwpTabletToolV2> 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}}); }); } |
