librsvg r1197 - trunk



Author: doml
Date: Thu Feb 19 23:17:21 2009
New Revision: 1197
URL: http://svn.gnome.org/viewvc/librsvg?rev=1197&view=rev

Log:
2009-02-19  Robert Staudinger <robert staudinger gmail com>

        * rsvg-file.c: Do not allocate RsvgState in rsvg_new_image(), use the instance that's been
        allocated and set up in the call to _rsvg_node_init(). Bug #557082



Modified:
   trunk/ChangeLog
   trunk/rsvg-image.c

Modified: trunk/rsvg-image.c
==============================================================================
--- trunk/rsvg-image.c	(original)
+++ trunk/rsvg-image.c	Thu Feb 19 23:17:21 2009
@@ -554,11 +554,10 @@
     RsvgNodeImage *image;
     image = g_new (RsvgNodeImage, 1);
     _rsvg_node_init (&image->super);
+    g_assert (image->super.state);
     image->img = NULL;
     image->preserve_aspect_ratio = RSVG_ASPECT_RATIO_XMID_YMID;
     image->x = image->y = image->w = image->h = _rsvg_css_parse_length ("0");
-    image->super.state = g_new (RsvgState, 1);
-    rsvg_state_init (image->super.state);
     image->super.free = rsvg_node_image_free;
     image->super.draw = rsvg_node_image_draw;
     image->super.set_atts = rsvg_node_image_set_atts;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]