From 6f79c90b19ef0fa073a07e515db7639a2a81fb03 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 25 Jul 2008 05:51:24 +0000 Subject: [PATCH] (svg_load_image): Check for failure in return value of rsvg_handle_get_pixbuf. Free rsvg handle when done. --- src/image.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/image.c b/src/image.c index 5c8748eefba..58ea767dc9a 100644 --- a/src/image.c +++ b/src/image.c @@ -9024,7 +9024,9 @@ svg_load_image (f, img, contents, size) /* We can now get a valid pixel buffer from the svg file, if all went ok. */ pixbuf = fn_rsvg_handle_get_pixbuf (rsvg_handle); - eassert (pixbuf); + if (!pixbuf) + goto rsvg_error; + fn_rsvg_handle_free (rsvg_handle); /* Extract some meta data from the svg handle. */ width = fn_gdk_pixbuf_get_width (pixbuf); -- 2.39.2