From: Chong Yidong Date: Fri, 25 Jul 2008 05:51:24 +0000 (+0000) Subject: (svg_load_image): Check for failure in return value of X-Git-Tag: emacs-pretest-23.0.90~3897 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6f79c90b19ef0fa073a07e515db7639a2a81fb03;p=emacs.git (svg_load_image): Check for failure in return value of rsvg_handle_get_pixbuf. Free rsvg handle when done. --- 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);