Warn if XML.removeNode fails for whatever reason

This commit is contained in:
David Wendt 2019-12-27 20:14:43 -07:00
parent 1577f51730
commit 568d90f4dc
1 changed files with 3 additions and 1 deletions

View File

@ -164,7 +164,9 @@ pub fn xmlnode_remove_node<'gc>(
) -> Result<ReturnValue<'gc>, Error> { ) -> Result<ReturnValue<'gc>, Error> {
if let Some(node) = this.as_xml_node() { if let Some(node) = this.as_xml_node() {
if let Ok(Some(mut parent)) = node.parent() { if let Ok(Some(mut parent)) = node.parent() {
parent.remove_child(ac.gc_context, node); if let Err(e) = parent.remove_child(ac.gc_context, node) {
log::warn!("Error in XML.removeNode: {}", e);
}
} }
} }