From aa5394cad2dc0bac46631e29005cbc7b99d03330 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Fri, 12 Feb 2010 05:05:40 +0100 Subject: [PATCH] Check node->name for null Seems to happen sometimes with a well placed xml comment. --- obt/xml.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/obt/xml.c b/obt/xml.c index 92e23430..da3e866b 100644 --- a/obt/xml.c +++ b/obt/xml.c @@ -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; } }