diff options
| author | xdavidwu <xdavidwuph@gmail.com> | 2023-07-18 13:09:24 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2023-07-18 14:09:31 +0000 |
| commit | 0b8791d1c5d1bc71daff481874e6c9e44d0dba79 (patch) | |
| tree | d69fc58000d9b71d150b5187cf28085ccf420e38 | |
| parent | Merge branch 'scale-is-floating-point' (diff) | |
wayland: fix pointer cap lost handling
Before this, on compositor without cursor-shape support, a pointer
capability lost of the seat makes foot crash.
| -rw-r--r-- | wayland.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -341,8 +341,10 @@ seat_handle_capabilities(void *data, struct wl_seat *wl_seat, } else { if (seat->wl_pointer != NULL) { #if defined(HAVE_CURSOR_SHAPE) - wp_cursor_shape_device_v1_destroy(seat->pointer.shape_device); - seat->pointer.shape_device = NULL; + if (seat->pointer.shape_device != NULL) { + wp_cursor_shape_device_v1_destroy(seat->pointer.shape_device); + seat->pointer.shape_device = NULL; + } #endif wl_pointer_release(seat->wl_pointer); |
