aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-07-25 05:51:24 +0000
committerChong Yidong2008-07-25 05:51:24 +0000
commit6f79c90b19ef0fa073a07e515db7639a2a81fb03 (patch)
tree6692dd1cf704a4269dbcaaa81a713dba04d8d482
parentb293d659771dad4fac47d5558a6b12f8d5f4571f (diff)
downloademacs-6f79c90b19ef0fa073a07e515db7639a2a81fb03.tar.gz
emacs-6f79c90b19ef0fa073a07e515db7639a2a81fb03.zip
(svg_load_image): Check for failure in return value of
rsvg_handle_get_pixbuf. Free rsvg handle when done.
-rw-r--r--src/image.c4
1 files changed, 3 insertions, 1 deletions
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)
9024 /* We can now get a valid pixel buffer from the svg file, if all 9024 /* We can now get a valid pixel buffer from the svg file, if all
9025 went ok. */ 9025 went ok. */
9026 pixbuf = fn_rsvg_handle_get_pixbuf (rsvg_handle); 9026 pixbuf = fn_rsvg_handle_get_pixbuf (rsvg_handle);
9027 eassert (pixbuf); 9027 if (!pixbuf)
9028 goto rsvg_error;
9029 fn_rsvg_handle_free (rsvg_handle);
9028 9030
9029 /* Extract some meta data from the svg handle. */ 9031 /* Extract some meta data from the svg handle. */
9030 width = fn_gdk_pixbuf_get_width (pixbuf); 9032 width = fn_gdk_pixbuf_get_width (pixbuf);