changeset 97003:1c0b739f899d

(svg_load_image): Check for failure in return value of rsvg_handle_get_pixbuf. Free rsvg handle when done.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 25 Jul 2008 05:51:24 +0000
parents 1ff787a61e48
children 1b8d15c8653f
files src/image.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/image.c	Fri Jul 25 05:51:10 2008 +0000
+++ b/src/image.c	Fri Jul 25 05:51:24 2008 +0000
@@ -9024,7 +9024,9 @@
   /* 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);