Skip to content

Commit

Permalink
Don't mark nil objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie Savage committed Jun 12, 2016
1 parent 5eed5f5 commit ffccf6b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ext/libxml/ruby_xml_node.c
Expand Up @@ -85,10 +85,12 @@ static void rxml_node_free(xmlNodePtr xnode)
return;

doc = rxml_lookup_doc(xnode->doc);
rb_gc_mark(doc);
if (doc != Qnil)
rb_gc_mark(doc);

parent = rxml_lookup_node(xnode->parent);
rb_gc_mark(parent);
if (parent != Qnil)
rb_gc_mark(parent);
}

VALUE rxml_node_wrap(xmlNodePtr xnode)
Expand Down

0 comments on commit ffccf6b

Please sign in to comment.