diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/image.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/image.c b/src/image.c index 355c849491a..8cab860085f 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -9530,10 +9530,13 @@ svg_load_image (struct frame *f, struct image *img, char *contents, | |||
| 9530 | if (base_file) | 9530 | if (base_file) |
| 9531 | g_object_unref (base_file); | 9531 | g_object_unref (base_file); |
| 9532 | g_object_unref (input_stream); | 9532 | g_object_unref (input_stream); |
| 9533 | if (err) goto rsvg_error; | 9533 | |
| 9534 | /* Check rsvg_handle too, to avoid librsvg 2.40.13 bug (Bug#36773#26). */ | ||
| 9535 | if (!rsvg_handle || err) goto rsvg_error; | ||
| 9534 | #else | 9536 | #else |
| 9535 | /* Make a handle to a new rsvg object. */ | 9537 | /* Make a handle to a new rsvg object. */ |
| 9536 | rsvg_handle = rsvg_handle_new (); | 9538 | rsvg_handle = rsvg_handle_new (); |
| 9539 | eassume (rsvg_handle); | ||
| 9537 | 9540 | ||
| 9538 | /* Set base_uri for properly handling referenced images (via 'href'). | 9541 | /* Set base_uri for properly handling referenced images (via 'href'). |
| 9539 | See rsvg bug 596114 - "image refs are relative to curdir, not .svg file" | 9542 | See rsvg bug 596114 - "image refs are relative to curdir, not .svg file" |
| @@ -9654,7 +9657,8 @@ svg_load_image (struct frame *f, struct image *img, char *contents, | |||
| 9654 | return 1; | 9657 | return 1; |
| 9655 | 9658 | ||
| 9656 | rsvg_error: | 9659 | rsvg_error: |
| 9657 | g_object_unref (rsvg_handle); | 9660 | if (rsvg_handle) |
| 9661 | g_object_unref (rsvg_handle); | ||
| 9658 | /* FIXME: Use error->message so the user knows what is the actual | 9662 | /* FIXME: Use error->message so the user knows what is the actual |
| 9659 | problem with the image. */ | 9663 | problem with the image. */ |
| 9660 | image_error ("Error parsing SVG image `%s'", img->spec); | 9664 | image_error ("Error parsing SVG image `%s'", img->spec); |