commit 5a470a25a1132d0efc5e1c46c87aa4cb0ba812ae
parent b1fb5ac20c6fc231d8b9fb418c21f68fe5d7bd6b
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 4 Feb 2009 22:25:19 +0000
extra checks
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/plugins/thumbnail/thumbnailextractor.c b/src/plugins/thumbnail/thumbnailextractor.c
@@ -148,6 +148,9 @@ libextractor_thumbnailgtk_extract (const char *filename,
out = gdk_pixbuf_scale_simple (in, width, height, GDK_INTERP_BILINEAR);
g_object_unref (in);
thumb = NULL;
+ length = 0;
+ if (out == NULL)
+ return prev;
if (!gdk_pixbuf_save_to_buffer (out, &thumb, &length, "png", NULL,
"compression", 9, NULL))
{