aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Ingebrigtsen2020-11-01 00:10:21 +0100
committerLars Ingebrigtsen2020-11-01 00:10:30 +0100
commit9405cd84a6309f780e76c11a4c79709aa8a4f44f (patch)
treea91182f5eb873be56688eedf99daf3bc489710a3 /src
parent5d9e456c3ed3dcefe6bf48e24a1a8f275fc887cb (diff)
downloademacs-9405cd84a6309f780e76c11a4c79709aa8a4f44f.tar.gz
emacs-9405cd84a6309f780e76c11a4c79709aa8a4f44f.zip
Fix a segfault in the new svg code
* src/image.c (svg_load_image): Don't pass in a NULL for the logical rect, because that will sometimes segfault.
Diffstat (limited to 'src')
-rw-r--r--src/image.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/image.c b/src/image.c
index 61c5aa760c7..c857b8e62a4 100644
--- a/src/image.c
+++ b/src/image.c
@@ -9808,11 +9808,11 @@ svg_load_image (struct frame *f, struct image *img, char *contents,
9808 9808
9809 /* Get the image dimensions. */ 9809 /* Get the image dimensions. */
9810#if LIBRSVG_CHECK_VERSION (2, 46, 0) 9810#if LIBRSVG_CHECK_VERSION (2, 46, 0)
9811 RsvgRectangle zero_rect, viewbox; 9811 RsvgRectangle zero_rect, viewbox, out_logical_rect;
9812 9812
9813 rsvg_handle_get_geometry_for_layer (rsvg_handle, NULL, 9813 rsvg_handle_get_geometry_for_layer (rsvg_handle, NULL,
9814 &zero_rect, &viewbox, 9814 &zero_rect, &viewbox,
9815 NULL, NULL); 9815 &out_logical_rect, NULL);
9816 viewbox_width = viewbox.x + viewbox.width; 9816 viewbox_width = viewbox.x + viewbox.width;
9817 viewbox_height = viewbox.y + viewbox.height; 9817 viewbox_height = viewbox.y + viewbox.height;
9818#else 9818#else