nsxiv92b2779
Fixed issue #28
+7 −9
2 files changed
| @@ -1,4 +1,4 @@ | |||
| 1 | − | VERSION = git-20111105 | |
| 1 | + | VERSION = git-20111111 | |
| 2 | 2 | ||
| 3 | 3 | CC = gcc | |
| 4 | 4 | CFLAGS = -ansi -Wall -pedantic -O2 | |
| @@ -311,18 +311,16 @@ bool img_load(img_t *img, const fileinfo_t *file) { | |||
| 311 | 311 | imlib_image_set_changes_on_disk(); | |
| 312 | 312 | imlib_context_set_anti_alias(img->aa); | |
| 313 | 313 | ||
| 314 | − | fmt = imlib_image_format(); | |
| 315 | − | /* avoid unused-but-set-variable warning */ | |
| 316 | − | (void) fmt; | |
| 317 | − | ||
| 314 | + | if ((fmt = imlib_image_format()) != NULL) { | |
| 318 | 315 | #if EXIF_SUPPORT | |
| 319 | − | if (STREQ(fmt, "jpeg")) | |
| 320 | − | exif_auto_orientate(file); | |
| 316 | + | if (STREQ(fmt, "jpeg")) | |
| 317 | + | exif_auto_orientate(file); | |
| 321 | 318 | #endif | |
| 322 | 319 | #if GIF_SUPPORT | |
| 323 | − | if (STREQ(fmt, "gif")) | |
| 324 | − | img_load_gif(img, file); | |
| 320 | + | if (STREQ(fmt, "gif")) | |
| 321 | + | img_load_gif(img, file); | |
| 325 | 322 | #endif | |
| 323 | + | } | |
| 326 | 324 | ||
| 327 | 325 | img->w = imlib_image_get_width(); | |
| 328 | 326 | img->h = imlib_image_get_height(); | |