]> git.mdlowis.com Git - proto/labwc.git/commitdiff
input: add tool_v2 NULL check
authorJens Peters <jp7677@gmail.com>
Wed, 4 Jun 2025 20:23:38 +0000 (22:23 +0200)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Sat, 7 Jun 2025 20:31:23 +0000 (05:31 +0900)
Should be quite unusual, but tool_v2 can be NULL.

src/input/tablet.c

index ea707308c9a7bfa934edbfc3c4766c3c3d6af60d..7145f8a28e0977d14397308b3f9cbfa33b68b7a3 100644 (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);
                        }