# HG changeset patch # User nadvornik # Date 1220471531 0 # Node ID 999919edcb7bf48a19774551975e76b60061103a # Parent f10b680b4baaeff047a401a88f2d6e7a260f1e9d fixed handling of broken images diff -r f10b680b4baa -r 999919edcb7b src/image.c --- 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);