Skip to content

Commit

Permalink
wayland: Do not try to lock on an invalid pointer
Browse files Browse the repository at this point in the history
This happens if you try to lock the pointer and (caps & WL_SEAT_CAPABILITY_POINTER) is false
Leading to input->pointer being NULL which ends up bringing the wayland client down (at lease on weston)
  • Loading branch information
BrandonSchaefer committed Dec 6, 2018
1 parent 7468d1e commit f9192ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/video/wayland/SDL_waylandevents.c
Expand Up @@ -1104,6 +1104,9 @@ int Wayland_input_lock_pointer(struct SDL_WaylandInput *input)
if (!d->pointer_constraints)
return -1;

if (!input->pointer)
return -1;

if (!input->relative_pointer) {
relative_pointer =
zwp_relative_pointer_manager_v1_get_relative_pointer(
Expand Down

0 comments on commit f9192ab

Please sign in to comment.