mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-16 05:37:28 +00:00
wayland: Check the relative pointer handle before destroying
If the relative protocol is unsupported, this will always be null and the destroy function won't be called. (cherry picked from commit0e87b71d08) (cherry picked from commit19c3e125ba)
This commit is contained in:
@@ -2621,8 +2621,10 @@ int Wayland_input_unlock_pointer(struct SDL_WaylandInput *input)
|
||||
w->locked_pointer = NULL;
|
||||
}
|
||||
|
||||
zwp_relative_pointer_v1_destroy(input->relative_pointer);
|
||||
input->relative_pointer = NULL;
|
||||
if (input->relative_pointer) {
|
||||
zwp_relative_pointer_v1_destroy(input->relative_pointer);
|
||||
input->relative_pointer = NULL;
|
||||
}
|
||||
|
||||
d->relative_mouse_mode = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user