input: add tool_v2 NULL check

Should be quite unusual, but tool_v2 can be NULL.
This commit is contained in:
Jens Peters 2025-06-04 22:23:38 +02:00 committed by Hiroaki Yamamoto
parent a73b866129
commit 36c1948d0b

View file

@ -417,7 +417,7 @@ handle_tablet_tool_axis(struct wl_listener *listener, void *data)
}
} else {
if (ev->updated_axes & (WLR_TABLET_TOOL_AXIS_X | WLR_TABLET_TOOL_AXIS_Y)) {
if (tool && tool->tool_v2->focused_surface) {
if (tool && tool->tool_v2 && tool->tool_v2->focused_surface) {
wlr_tablet_v2_tablet_tool_notify_proximity_out(
tool->tool_v2);
}