changeset 972:709edc695101

set fallback pixbuf in case of missing file
author Vladimir Nadvornik <nadvornik@suse.cz>
date Tue, 19 Aug 2008 21:01:29 +0000
parents 8fcd67db3e06
children 38ba89b95ee8
files src/thumb_standard.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/thumb_standard.c	Tue Aug 19 20:58:23 2008 +0000
+++ b/src/thumb_standard.c	Tue Aug 19 21:01:29 2008 +0000
@@ -657,9 +657,13 @@
 
 	thumb_loader_std_reset(tl);
 
-	if (!stat_utf8(fd->path, &st)) return FALSE;
 
 	tl->fd = file_data_ref(fd);
+	if (!stat_utf8(fd->path, &st))
+		{
+		thumb_loader_std_set_fallback(tl);
+		return FALSE;
+		}
 	tl->source_mtime = st.st_mtime;
 	tl->source_size = st.st_size;
 	tl->source_mode = st.st_mode;