From 92b2779b001058accd561d2fff4d1348d04dd448 Mon Sep 17 00:00:00 2001 From: Bert Münnich Date: Fri, 11 Nov 2011 22:54:20 +0100 Subject: Fixed issue #28 --- Makefile | 2 +- image.c | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 6f503b4..efda16f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = git-20111105 +VERSION = git-20111111 CC = gcc CFLAGS = -ansi -Wall -pedantic -O2 diff --git a/image.c b/image.c index 2fe228f..c6b6f31 100644 --- a/image.c +++ b/image.c @@ -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(); -- cgit v1.2.3-54-g00ecf