Commit 2def38a5 authored by Ross Burton's avatar Ross Burton Committed by Dom Lachowicz

Bug 402246 - Rsvg was leaking Pango contexts, layouts, and GList nodes.

2007-01-30  Ross Burton <ross@burtonini.com>

        * rsvg-cairo-draw.c: Bug 402246 - Rsvg was leaking Pango contexts,
        layouts, and GList nodes.
        * rsvg-text.c: Ditto

svn path=/trunk/; revision=1095
parent 1072f667
2007-01-30 Ross Burton <ross@burtonini.com>
* rsvg-cairo-draw.c: Bug 402246 - Rsvg was leaking Pango contexts,
layouts, and GList nodes.
* rsvg-text.c: Ditto
2007-01-29 Dom Lachowicz <domlachowicz@gmail.com>
* test-display.c: 402107 . rsvg_convert and rsvg_viiew crash if called without arguments
......
......@@ -942,7 +942,7 @@ rsvg_cairo_pop_render_stack (RsvgDrawingCtx * ctx)
surface = cairo_get_target (child_cr);
render->cr = (cairo_t *) render->cr_stack->data;
render->cr_stack = g_list_remove_link (render->cr_stack, render->cr_stack);
render->cr_stack = g_list_delete_link (render->cr_stack, render->cr_stack);
cairo_set_source_surface (render->cr, surface, 0, 0);
......@@ -965,7 +965,7 @@ rsvg_cairo_pop_render_stack (RsvgDrawingCtx * ctx)
render->bbox = *((RsvgBbox *) render->bb_stack->data);
g_free (render->bb_stack->data);
render->bb_stack = g_list_remove_link (render->bb_stack, render->bb_stack);
render->bb_stack = g_list_delete_link (render->bb_stack, render->bb_stack);
if (state->filter) {
g_object_unref (G_OBJECT (output));
......
......@@ -861,6 +861,8 @@ rsvg_text_render_text (RsvgDrawingCtx * ctx, const char *text, gdouble * x, gdou
pango_layout_iter_free (iter);
ctx->render->render_pango_layout (ctx, layout, *x, *y - baseline);
*x += w;
g_object_unref (layout);
g_object_unref (context);
} else {
GString *render;
render = rsvg_text_render_text_as_string (ctx, text, x, y);
......
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