diff --git a/main.c b/main.c index 5bfefe1..82ec700 100644 --- a/main.c +++ b/main.c @@ -283,6 +283,7 @@ seat_handle_capabilities(void *data, struct wl_seat *wl_seat, } else { if (pointer != NULL) { wl_pointer_destroy(pointer); + pointer = NULL; } } if ((caps & WL_SEAT_CAPABILITY_TOUCH)) { @@ -293,6 +294,7 @@ seat_handle_capabilities(void *data, struct wl_seat *wl_seat, } else { if (touch != NULL) { wl_touch_destroy(touch); + touch = NULL; } } }