Validate arguments

We're just assuming everything is not NULL or with a valid type.
This commit is contained in:
Emmanuele Bassi 2021-01-26 12:56:32 +00:00
parent 786e9d351c
commit f41012080f

View File

@ -2984,6 +2984,11 @@ gdk_surface_translate_coordinates (GdkSurface *from,
int x1, y1, x2, y2;
GdkSurface *f, *t;
g_return_val_if_fail (GDK_IS_SURFACE (from), FALSE);
g_return_val_if_fail (GDK_IS_SURFACE (to), FALSE);
g_return_val_if_fail (x != NULL, FALSE);
g_return_val_if_fail (y != NULL, FALSE);
in_x = *x;
in_y = *y;