[gnome-photos] gegl: Be more strict about what is acceptable



commit 7128f1dfc58f3fab598171f02f895c58ba0d924d
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Nov 28 19:07:06 2018 +0100

    gegl: Be more strict about what is acceptable

 src/photos-gegl.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/photos-gegl.c b/src/photos-gegl.c
index 7788b758..cb62073c 100644
--- a/src/photos-gegl.c
+++ b/src/photos-gegl.c
@@ -389,6 +389,8 @@ photos_gegl_buffer_new_from_pixbuf (GdkPixbuf *pixbuf)
   gint width;
   const guint8 *pixels;
 
+  g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
+
   height = gdk_pixbuf_get_height (pixbuf);
   width = gdk_pixbuf_get_width (pixbuf);
   gegl_rectangle_set (&bbox, 0, 0, (guint) width, (guint) height);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]