mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
wayland: fix crash in gdk_window_wayland_get_root_coords().
Both root_x and root_y may be NULL, so check first before setting.
This commit is contained in:
parent
6278c40451
commit
5add9625e2
@ -1269,8 +1269,11 @@ gdk_window_wayland_get_root_coords (GdkWindow *window,
|
||||
|
||||
_gdk_wayland_window_offset (window, &x_offset, &y_offset);
|
||||
|
||||
*root_x = x_offset + x;
|
||||
*root_y = y_offset + y;
|
||||
if (root_x)
|
||||
*root_x = x_offset + x;
|
||||
|
||||
if (root_y)
|
||||
*root_y = y_offset + y;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user