[mutter] cursor-tracker: Check for NULL coordinates before retrieving them
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cursor-tracker: Check for NULL coordinates before retrieving them
- Date: Wed, 28 Oct 2020 15:52:35 +0000 (UTC)
commit aff14eab866a98907ab6bee51dec707365f67ce1
Author: Daniel van Vugt <daniel van vugt canonical com>
Date: Wed Oct 28 17:29:48 2020 +0800
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
src/backends/meta-cursor-tracker.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/backends/meta-cursor-tracker.c b/src/backends/meta-cursor-tracker.c
index 943949d4a7..c6afd75c32 100644
--- a/src/backends/meta-cursor-tracker.c
+++ b/src/backends/meta-cursor-tracker.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]