[librsvg/librsvg-2.44] pattern.rs: Log when we find a circular reference



commit 3df1c08730b250b5339381e892698fbbfb7df2ea
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Oct 24 11:49:06 2018 -0500

    pattern.rs: Log when we find a circular reference

 rsvg_internals/src/pattern.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/pattern.rs b/rsvg_internals/src/pattern.rs
index 46104c1d..47926e02 100644
--- a/rsvg_internals/src/pattern.rs
+++ b/rsvg_internals/src/pattern.rs
@@ -247,8 +247,11 @@ fn resolve_pattern(pattern: &Pattern, draw_ctx: &mut DrawingCtx<'_>) -> Pattern
             let node = acquired.get();
 
             if stack.contains(node) {
+                // FIXME: return a Result here with RenderingError::CircularReference
+                // FIXME: print the pattern's name
+                rsvg_log!("circular reference in pattern");
                 result.resolve_from_defaults();
-                break; // reference cycle; bail out
+                break;
             }
 
             node.with_impl(|i: &NodePattern| result.resolve_from_fallback(&*i.pattern.borrow()));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]