Skip to content
  • Federico Mena Quintero's avatar
    (#335): Don't panic if the toplevel node is not <svg> · a8307ac4
    Federico Mena Quintero authored
    In standard_element_start(), we were only setting the tree root if the
    first element in the file was an <svg> element.  Otherwise we would
    simply unref the element at the end of the function.  This caused its
    first child to be left with weak reference to a dead parent; the
    subsequent call to child.get_parent() would upgrade().unwrap() on the
    weak reference, and the unwrap() would panic as the parent is already
    dead.
    
    #335
    a8307ac4