Commit 2cd1fcab authored by Dom Lachowicz's avatar Dom Lachowicz

remove unecessary g_new0()

parent 6e9d8ea4
......@@ -3,6 +3,7 @@
* configure.in: Bump version number
* *.c: C89 build fixes from jensgr@gmx.net (Jens Granseuer) - bug 322489
* rsvg-cairo-render.c, rsvg.c, rsvg.h: Make mods to Caleb's latest work. Prefer to expose a Cairo API that can render an element by id, and then go from there.
* rsvg.c: No need to g_new0() data since we'll be overwriting it anyway
2005-11-26 Caleb Moore <c.moore@student.unsw.edu.au>
......
......@@ -123,7 +123,8 @@ void
rsvg_cairo_render_sub (cairo_t *cr, RsvgHandle *handle, const char * id)
{
RsvgDrawingCtx * draw;
RsvgNode * drawsub;
RsvgNode * drawsub = NULL;
g_return_if_fail (handle != NULL);
if (!handle->finished)
......
......@@ -67,7 +67,7 @@ rsvg_handle_get_pixbuf_sub (RsvgHandle *handle, const char * id)
rsvg_handle_get_dimensions (handle, &dimensions);
rowstride = dimensions.width * 4;
pixels = g_new0(guint8, dimensions.width * dimensions.height * 4);
pixels = g_new(guint8, dimensions.width * dimensions.height * 4);
surface = cairo_image_surface_create_for_data (pixels,
CAIRO_FORMAT_ARGB32,
......@@ -76,10 +76,7 @@ rsvg_handle_get_pixbuf_sub (RsvgHandle *handle, const char * id)
cr = cairo_create (surface);
if (id == NULL)
rsvg_cairo_render (cr, handle);
else
rsvg_cairo_render_sub (cr, handle, id);
rsvg_cairo_render_sub (cr, handle, id);
rsvg_cairo_to_pixbuf(pixels, rowstride, dimensions.height);
output = gdk_pixbuf_new_from_data (pixels,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment