diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-09-29 16:34:37 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-09-29 16:34:37 +0200 |
commit | 7281c129a9bf11594179a768aa34213fe69e98ed (patch) | |
tree | a67bf0e25018c8a79096f499246e279fcc07dd19 /src/filelist.c | |
parent | 88c1d182b11c442cf8c0930e682b7ad571e9212d (diff) |
feh_printf: Check feh_file_info_load return status
Diffstat (limited to 'src/filelist.c')
-rw-r--r-- | src/filelist.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/filelist.c b/src/filelist.c index 215f371..23239f9 100644 --- a/src/filelist.c +++ b/src/filelist.c @@ -321,11 +321,10 @@ int feh_file_info_load(feh_file * file, Imlib_Image im) if (im) im1 = im; - else if (!feh_load_image(&im1, file)) - return(1); - - if (!im1) + else if (!feh_load_image(&im1, file) || !im1) { + weprintf("couldn't load %s", file->filename); return(1); + } file->info = feh_file_info_new(); @@ -340,7 +339,7 @@ int feh_file_info_load(feh_file * file, Imlib_Image im) file->info->size = st.st_size; - if (need_free && im1) + if (need_free) gib_imlib_free_image_and_decache(im1); return(0); } |