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:
Christian Hergert 2013-08-30 00:23:56 -07:00
parent 6278c40451
commit 5add9625e2

View File

@ -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;
}