changeset 1031:999919edcb7b

fixed handling of broken images
author nadvornik
date Wed, 03 Sep 2008 19:52:11 +0000
parents f10b680b4baa
children 7c87b324b9bb
files src/image.c
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/image.c	Mon Sep 01 19:18:32 2008 +0000
+++ b/src/image.c	Wed Sep 03 19:52:11 2008 +0000
@@ -422,10 +422,6 @@
 			g_object_ref(imd->read_ahead_fd->pixbuf);
 			image_cache_set(imd, imd->read_ahead_fd);
 			}
-		else
-			{
-			imd->read_ahead_fd->pixbuf = pixbuf_inline(PIXBUF_INLINE_BROKEN);
-			}
 		}
 	image_loader_free(imd->read_ahead_il);
 	imd->read_ahead_il = NULL;
@@ -562,7 +558,17 @@
 		image_cache_set(imd, imd->image_fd);
 		}
 
-	if (imd->delay_flip &&
+	if (!image_loader_get_pixbuf(imd->il))
+		{
+		GdkPixbuf *pixbuf;
+
+		pixbuf = pixbuf_inline(PIXBUF_INLINE_BROKEN);
+		image_change_pixbuf(imd, pixbuf, image_zoom_get(imd));
+		g_object_unref(pixbuf);
+
+		imd->unknown = TRUE;
+		}
+	else if (imd->delay_flip &&
 	    image_get_pixbuf(imd) != image_loader_get_pixbuf(imd->il))
 		{
 		g_object_set(G_OBJECT(imd->pr), "complete", FALSE, NULL);