]> www.fi.muni.cz Git - evince.git/commitdiff
document: create_thumbnail_frame should return NULL when
authorJosé Aliste <jaliste@src.gnome.org>
Fri, 26 Nov 2010 14:56:45 +0000 (11:56 -0300)
committerJosé Aliste <jaliste@src.gnome.org>
Fri, 26 Nov 2010 17:12:50 +0000 (14:12 -0300)
source_pixbuf is NULL and width and height are not positive.

Fixes bug #594408

libdocument/ev-document-misc.c

index bfba1ec8b5a9a9cba848c8bd9f8f096a798898de..e710edb8644d4f63995756e774d5522d743415be 100644 (file)
@@ -56,7 +56,7 @@ create_thumbnail_frame (int        width,
        }
 
        /* make sure no one is passing us garbage */
-       g_assert (width_r >= 0 && height_r >= 0);
+       g_return_val_if_fail (width_r >= 0 && height_r >= 0, NULL);
 
        retval = gdk_pixbuf_new (GDK_COLORSPACE_RGB,
                                 TRUE, 8,