]> git.eshelyaron.com Git - emacs.git/commitdiff
(svg_load_image): Check for failure in return value of
authorChong Yidong <cyd@stupidchicken.com>
Fri, 25 Jul 2008 05:51:24 +0000 (05:51 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Fri, 25 Jul 2008 05:51:24 +0000 (05:51 +0000)
rsvg_handle_get_pixbuf.  Free rsvg handle when done.

src/image.c

index 5c8748eefba11ed8afed0b7b20d445041d0ec206..58ea767dc9a904da69fe6711025e58cc53cb2029 100644 (file)
@@ -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);