Check node->name for null
Seems to happen sometimes with a well placed xml comment.
This commit is contained in:
parent
35ce211ec3
commit
aa5394cad2
1 changed files with 4 additions and 2 deletions
|
@ -300,8 +300,10 @@ void obt_xml_tree(ObtXmlInst *i, xmlNodePtr node)
|
|||
g_assert(i->doc); /* a doc is open? */
|
||||
|
||||
while (node) {
|
||||
struct Callback *c = g_hash_table_lookup(i->callbacks, node->name);
|
||||
if (c) c->func(node, c->data);
|
||||
if (node->name) {
|
||||
struct Callback *c = g_hash_table_lookup(i->callbacks, node->name);
|
||||
if (c) c->func(node, c->data);
|
||||
}
|
||||
node = node->next;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue