]> Dogcows Code - chaz/openbox/commitdiff
Check node->name for null
authorMikael Magnusson <mikachu@gmail.com>
Fri, 12 Feb 2010 04:05:40 +0000 (05:05 +0100)
committerMikael Magnusson <mikachu@gmail.com>
Fri, 12 Feb 2010 04:07:44 +0000 (05:07 +0100)
Seems to happen sometimes with a well placed xml comment.

obt/xml.c

index 92e234306fbaaf201f7475623b644a0e1c469c82..da3e866b6f5ea452ded04a1692335200597a0b06 100644 (file)
--- 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;
     }
 }
This page took 0.022181 seconds and 4 git commands to generate.