mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 05:01:09 +00:00
gdk: Add some return_if_fail() warnings
so we have a better chance of catching the correct cause of bugs like https://bugzilla.gnome.org/show_bug.cgi?id=719977
This commit is contained in:
parent
860138b302
commit
0bff206915
@ -284,6 +284,10 @@ gdk_cairo_surface_create_from_pixbuf (const GdkPixbuf *pixbuf,
|
||||
cairo_format_t format;
|
||||
cairo_surface_t *surface;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
|
||||
g_return_val_if_fail (scale > 0, NULL);
|
||||
g_return_val_if_fail (for_window == NULL || GDK_IS_WINDOW (for_window), NULL);
|
||||
|
||||
if (gdk_pixbuf_get_n_channels (pixbuf) == 3)
|
||||
format = CAIRO_FORMAT_RGB24;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user