1
0
Fork 0

cursor-tracker: Check for NULL coordinates before retrieving them

This makes Wayland consistent with X11 in not emitting warnings when
unwanted parameters are NULL.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1519
This commit is contained in:
Daniel van Vugt 2020-10-28 17:29:48 +08:00 committed by Georges Basile Stavracas Neto
parent ebe8cd3704
commit aff14eab86

View file

@ -501,7 +501,9 @@ get_pointer_position_clutter (graphene_point_t *point,
seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
cdevice = clutter_seat_get_pointer (seat);
clutter_input_device_get_coords (cdevice, NULL, point);
if (point)
clutter_input_device_get_coords (cdevice, NULL, point);
if (mods)
*mods = clutter_input_device_get_modifier_state (cdevice);
}