diff options
| author | Glenn Morris | 2020-09-09 07:51:14 -0700 |
|---|---|---|
| committer | Glenn Morris | 2020-09-09 07:51:14 -0700 |
| commit | 482fa0d9ed3d1b5ef6b95e908b5684a1f24cef4a (patch) | |
| tree | 3734bdc916a9895eed4dfbe2fbc05bb2597f38d4 /src | |
| parent | a5cc0242ebe174152a1488ddec26210f404fdd0f (diff) | |
| parent | 366a97c980f068a3ed665d337d644ee58cd25ca0 (diff) | |
| download | emacs-482fa0d9ed3d1b5ef6b95e908b5684a1f24cef4a.tar.gz emacs-482fa0d9ed3d1b5ef6b95e908b5684a1f24cef4a.zip | |
Merge from origin/emacs-27
366a97c980 (origin/emacs-27) Avoid crashes when trying to load bad GI...
7938713105 C++ Mode: handle comma separated brace initializers.
2b95300cf8 * lisp/display-fill-column-indicator.el: Fix bug#41145
Diffstat (limited to 'src')
| -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 d8c34669cc4..6ecf6a70fe2 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -8276,11 +8276,13 @@ gif_load (struct frame *f, struct image *img) | |||
| 8276 | if (gif == NULL) | 8276 | if (gif == NULL) |
| 8277 | { | 8277 | { |
| 8278 | #if HAVE_GIFERRORSTRING | 8278 | #if HAVE_GIFERRORSTRING |
| 8279 | image_error ("Cannot open `%s': %s", | 8279 | const char *errstr = GifErrorString (gif_err); |
| 8280 | file, build_string (GifErrorString (gif_err))); | 8280 | if (errstr) |
| 8281 | #else | 8281 | image_error ("Cannot open `%s': %s", file, build_string (errstr)); |
| 8282 | image_error ("Cannot open `%s'", file); | 8282 | else |
| 8283 | #endif | 8283 | #endif |
| 8284 | image_error ("Cannot open `%s'", file); | ||
| 8285 | |||
| 8284 | return 0; | 8286 | return 0; |
| 8285 | } | 8287 | } |
| 8286 | } | 8288 | } |
| @@ -8306,11 +8308,13 @@ gif_load (struct frame *f, struct image *img) | |||
| 8306 | if (!gif) | 8308 | if (!gif) |
| 8307 | { | 8309 | { |
| 8308 | #if HAVE_GIFERRORSTRING | 8310 | #if HAVE_GIFERRORSTRING |
| 8309 | image_error ("Cannot open memory source `%s': %s", | 8311 | const char *errstr = GifErrorString (gif_err); |
| 8310 | img->spec, build_string (GifErrorString (gif_err))); | 8312 | if (errstr) |
| 8311 | #else | 8313 | image_error ("Cannot open memory source `%s': %s", |
| 8312 | image_error ("Cannot open memory source `%s'", img->spec); | 8314 | img->spec, build_string (errstr)); |
| 8315 | else | ||
| 8313 | #endif | 8316 | #endif |
| 8317 | image_error ("Cannot open memory source `%s'", img->spec); | ||
| 8314 | return 0; | 8318 | return 0; |
| 8315 | } | 8319 | } |
| 8316 | } | 8320 | } |
| @@ -8593,9 +8597,9 @@ gif_load (struct frame *f, struct image *img) | |||
| 8593 | if (error_text) | 8597 | if (error_text) |
| 8594 | image_error ("Error closing `%s': %s", | 8598 | image_error ("Error closing `%s': %s", |
| 8595 | img->spec, build_string (error_text)); | 8599 | img->spec, build_string (error_text)); |
| 8596 | #else | 8600 | else |
| 8597 | image_error ("Error closing `%s'", img->spec); | ||
| 8598 | #endif | 8601 | #endif |
| 8602 | image_error ("Error closing `%s'", img->spec); | ||
| 8599 | } | 8603 | } |
| 8600 | 8604 | ||
| 8601 | /* Maybe fill in the background field while we have ximg handy. */ | 8605 | /* Maybe fill in the background field while we have ximg handy. */ |