[librsvg/librsvg-2.44] NodeUse: Log when referencing a nonexistent element
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/librsvg-2.44] NodeUse: Log when referencing a nonexistent element
- Date: Wed, 24 Oct 2018 22:05:04 +0000 (UTC)
commit b421cae56d079331d63d45bf4640691a17148ec3
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Oct 24 11:45:56 2018 -0500
NodeUse: Log when referencing a nonexistent element
rsvg_internals/src/structure.rs | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/structure.rs b/rsvg_internals/src/structure.rs
index 1965f176..f384413e 100644
--- a/rsvg_internals/src/structure.rs
+++ b/rsvg_internals/src/structure.rs
@@ -295,12 +295,19 @@ impl NodeTrait for NodeUse {
return Ok(());
}
- let child = if let Some(acquired) = draw_ctx.get_acquired_node(link.as_ref().unwrap()) {
+ let uri = link.as_ref().unwrap();
+
+ let child = if let Some(acquired) = draw_ctx.get_acquired_node(uri) {
// Here we clone the acquired child, so that we can drop the AcquiredNode as
// early as possible. This is so that the child's drawing method will be able
// to re-acquire the child for other purposes.
acquired.get().clone()
} else {
+ rsvg_log!(
+ "element {} references nonexistent \"{}\"",
+ node.get_human_readable_name(),
+ uri,
+ );
return Ok(());
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]