mirror of https://github.com/libsdl-org/SDL
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.
This commit is contained in:
parent
6127ac0871
commit
0e87b71d08
|
@ -2989,8 +2989,10 @@ int Wayland_input_unlock_pointer(struct SDL_WaylandInput *input)
|
||||||
w->locked_pointer = NULL;
|
w->locked_pointer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
zwp_relative_pointer_v1_destroy(input->relative_pointer);
|
if (input->relative_pointer) {
|
||||||
input->relative_pointer = NULL;
|
zwp_relative_pointer_v1_destroy(input->relative_pointer);
|
||||||
|
input->relative_pointer = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
d->relative_mouse_mode = 0;
|
d->relative_mouse_mode = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue