diff options
author | Bert Münnich <ber.t@gmx.com> | 2011-11-11 22:54:20 +0100 |
---|---|---|
committer | Bert Münnich <ber.t@gmx.com> | 2011-11-11 22:54:20 +0100 |
commit | 92b2779b001058accd561d2fff4d1348d04dd448 (patch) | |
tree | a604bf310d700bd76282c06c54643a9e344aa1a5 /image.c | |
parent | 5034792948e181de5f1f19737cccc394116a82b4 (diff) | |
download | nsxiv-92b2779b001058accd561d2fff4d1348d04dd448.tar.zst |
Fixed issue #28
Diffstat (limited to 'image.c')
-rw-r--r-- | image.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -311,18 +311,16 @@ bool img_load(img_t *img, const fileinfo_t *file) { imlib_image_set_changes_on_disk(); imlib_context_set_anti_alias(img->aa); - fmt = imlib_image_format(); - /* avoid unused-but-set-variable warning */ - (void) fmt; - + if ((fmt = imlib_image_format()) != NULL) { #if EXIF_SUPPORT - if (STREQ(fmt, "jpeg")) - exif_auto_orientate(file); + if (STREQ(fmt, "jpeg")) + exif_auto_orientate(file); #endif #if GIF_SUPPORT - if (STREQ(fmt, "gif")) - img_load_gif(img, file); + if (STREQ(fmt, "gif")) + img_load_gif(img, file); #endif + } img->w = imlib_image_get_width(); img->h = imlib_image_get_height(); |