diff options
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/image.c b/src/image.c index 56878bcb8cb..956fb1325ed 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -8160,11 +8160,13 @@ gif_load (struct frame *f, struct image *img) | |||
| 8160 | if (gif == NULL) | 8160 | if (gif == NULL) |
| 8161 | { | 8161 | { |
| 8162 | #if HAVE_GIFERRORSTRING | 8162 | #if HAVE_GIFERRORSTRING |
| 8163 | image_error ("Cannot open `%s': %s", | 8163 | const char *errstr = GifErrorString (gif_err); |
| 8164 | file, build_string (GifErrorString (gif_err))); | 8164 | if (errstr) |
| 8165 | #else | 8165 | image_error ("Cannot open `%s': %s", file, build_string (errstr)); |
| 8166 | image_error ("Cannot open `%s'", file); | 8166 | else |
| 8167 | #endif | 8167 | #endif |
| 8168 | image_error ("Cannot open `%s'", file); | ||
| 8169 | |||
| 8168 | return 0; | 8170 | return 0; |
| 8169 | } | 8171 | } |
| 8170 | } | 8172 | } |
| @@ -8190,11 +8192,13 @@ gif_load (struct frame *f, struct image *img) | |||
| 8190 | if (!gif) | 8192 | if (!gif) |
| 8191 | { | 8193 | { |
| 8192 | #if HAVE_GIFERRORSTRING | 8194 | #if HAVE_GIFERRORSTRING |
| 8193 | image_error ("Cannot open memory source `%s': %s", | 8195 | const char *errstr = GifErrorString (gif_err); |
| 8194 | img->spec, build_string (GifErrorString (gif_err))); | 8196 | if (errstr) |
| 8195 | #else | 8197 | image_error ("Cannot open memory source `%s': %s", |
| 8196 | image_error ("Cannot open memory source `%s'", img->spec); | 8198 | img->spec, build_string (errstr)); |
| 8199 | else | ||
| 8197 | #endif | 8200 | #endif |
| 8201 | image_error ("Cannot open memory source `%s'", img->spec); | ||
| 8198 | return 0; | 8202 | return 0; |
| 8199 | } | 8203 | } |
| 8200 | } | 8204 | } |
| @@ -8474,9 +8478,9 @@ gif_load (struct frame *f, struct image *img) | |||
| 8474 | if (error_text) | 8478 | if (error_text) |
| 8475 | image_error ("Error closing `%s': %s", | 8479 | image_error ("Error closing `%s': %s", |
| 8476 | img->spec, build_string (error_text)); | 8480 | img->spec, build_string (error_text)); |
| 8477 | #else | 8481 | else |
| 8478 | image_error ("Error closing `%s'", img->spec); | ||
| 8479 | #endif | 8482 | #endif |
| 8483 | image_error ("Error closing `%s'", img->spec); | ||
| 8480 | } | 8484 | } |
| 8481 | 8485 | ||
| 8482 | /* Maybe fill in the background field while we have ximg handy. */ | 8486 | /* Maybe fill in the background field while we have ximg handy. */ |