[librsvg] rsvg_handle_render_cairo_sub(): Traverse and ref ancestors correctly
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] rsvg_handle_render_cairo_sub(): Traverse and ref ancestors correctly
- Date: Fri, 17 Mar 2017 02:00:51 +0000 (UTC)
commit 6d993e990fcadeec6d52e5997178c2e3fe57dfa1
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Mar 16 19:05:10 2017 -0600
rsvg_handle_render_cairo_sub(): Traverse and ref ancestors correctly
We get a new reference from rsvg_node_get_parent(); this wasn't being
used correctly.
rsvg-cairo-render.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/rsvg-cairo-render.c b/rsvg-cairo-render.c
index 1afa60c..262a213 100644
--- a/rsvg-cairo-render.c
+++ b/rsvg-cairo-render.c
@@ -233,8 +233,10 @@ rsvg_handle_render_cairo_sub (RsvgHandle * handle, cairo_t * cr, const char *id)
return FALSE;
if (drawsub) {
+ drawsub = rsvg_node_ref (drawsub);
+
while (drawsub != NULL) {
- draw->drawsub_stack = g_slist_prepend (draw->drawsub_stack, rsvg_node_ref (drawsub));
+ draw->drawsub_stack = g_slist_prepend (draw->drawsub_stack, drawsub);
drawsub = rsvg_node_get_parent (drawsub);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]