[librsvg] Log the element name when a pattern has a circular reference
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Log the element name when a pattern has a circular reference
- Date: Wed, 2 Jan 2019 17:39:49 +0000 (UTC)
commit 16891034dceec9e1249ff3c279fd1f220838c5c1
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Jan 2 11:37:56 2019 -0600
Log the element name when a pattern has a circular reference
rsvg_internals/src/pattern.rs | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/rsvg_internals/src/pattern.rs b/rsvg_internals/src/pattern.rs
index fa681e94..9d7c5720 100644
--- a/rsvg_internals/src/pattern.rs
+++ b/rsvg_internals/src/pattern.rs
@@ -251,19 +251,21 @@ impl PaintSource for NodePattern {
if let Some(acquired) =
draw_ctx.get_acquired_node_of_type(result.fallback.as_ref(), NodeType::Pattern)
{
- let node = acquired.get();
+ let a_node = acquired.get();
- if stack.contains(node) {
- // FIXME: print the pattern's name
- rsvg_log!("circular reference in pattern");
+ if stack.contains(a_node) {
+ rsvg_log!(
+ "circular reference in pattern {}",
+ node.get_human_readable_name()
+ );
return Err(RenderingError::CircularReference);
}
- node.with_impl(|i: &NodePattern| {
+ a_node.with_impl(|i: &NodePattern| {
result.resolve_from_fallback(&*i.pattern.borrow())
});
- stack.push(node);
+ stack.push(a_node);
} else {
result.resolve_from_defaults();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]