summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-pnm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdk-pixbuf/io-pnm.c')
-rw-r--r--gdk-pixbuf/io-pnm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdk-pixbuf/io-pnm.c b/gdk-pixbuf/io-pnm.c
index 91e7dca67..856501ae5 100644
--- a/gdk-pixbuf/io-pnm.c
+++ b/gdk-pixbuf/io-pnm.c
@@ -873,6 +873,12 @@ gdk_pixbuf__pnm_image_stop_load (gpointer data,
if (context->pixbuf)
g_object_unref (context->pixbuf);
+ else {
+ g_set_error_literal (error, GDK_PIXBUF_ERROR,
+ GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
+ _("Premature end-of-file encountered"));
+ retval = FALSE;
+ }
#if 0
/* We should ignore trailing newlines and we can't