Index: gdk-pixbuf/io-png.c
===================================================================
--- gdk-pixbuf/io-png.c	(Revision 21209)
+++ gdk-pixbuf/io-png.c	(Arbeitskopie)
@@ -480,6 +480,7 @@ static gboolean
 gdk_pixbuf__png_image_stop_load (gpointer context, GError **error)
 {
         LoadContext* lc = context;
+        gboolean retval = TRUE;
 
         g_return_val_if_fail(lc != NULL, TRUE);
 
@@ -489,11 +490,19 @@ gdk_pixbuf__png_image_stop_load (gpointe
         
         if (lc->pixbuf)
                 g_object_unref (lc->pixbuf);
+        else {
+                if (error && *error == NULL) {
+                        g_set_error_literal (error, GDK_PIXBUF_ERROR,
+                                             GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
+                                             _("Premature end-of-file encountered"));
+                }
+                retval = FALSE;
+	}
         
         png_destroy_read_struct(&lc->png_read_ptr, &lc->png_info_ptr, NULL);
         g_free(lc);
 
-        return TRUE;
+        return retval;
 }
 
 static gboolean
