diff options
author | Federico Mena Quintero <federico@gnome.org> | 2017-11-11 04:52:09 -0600 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2017-12-05 06:58:10 -0600 |
commit | fe5711c8785a4ef3582752e2109e54440102c702 (patch) | |
tree | 3285c28264527705ad487f20c5365f7cf3f7b29a | |
parent | 90cda486949d92e8ef3185e8e7a581e20f8a5f27 (diff) | |
download | librsvg-fe5711c8785a4ef3582752e2109e54440102c702.tar.gz |
bgo#761175 - Allow masks to (re)use a node being referenced
If a <use> element acquires a node for drawing, then it needs to
release the node before calling pop_discrete_layer(). Mask generation
occurs in that function, and the mask may in turn reuse the referenced
node. If the node is still acquired at that time, the mask will not
be able to use it.
https://bugzilla.gnome.org/show_bug.cgi?id=761175
-rw-r--r-- | rsvg-structure.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rsvg-structure.c b/rsvg-structure.c index 4ab44730..3c972e50 100644 --- a/rsvg-structure.c +++ b/rsvg-structure.c @@ -210,6 +210,8 @@ rsvg_node_use_draw (RsvgNode * self, RsvgDrawingCtx * ctx, int dominate) rsvg_state_push (ctx); rsvg_node_draw (child, ctx, 1); rsvg_state_pop (ctx); + + rsvg_release_node (ctx, child); rsvg_pop_discrete_layer (ctx); } else { RsvgNodeSymbol *symbol = (RsvgNodeSymbol *) child; @@ -246,9 +248,9 @@ rsvg_node_use_draw (RsvgNode * self, RsvgDrawingCtx * ctx, int dominate) rsvg_pop_discrete_layer (ctx); if (symbol->vbox.active) _rsvg_pop_view_box (ctx); - } - rsvg_release_node (ctx, child); + rsvg_release_node (ctx, child); + } } static void |