diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-14 14:06:11 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-14 14:06:11 +0100 |
commit | 4452e69ab1f01793a37205db8227a2de2f211d3e (patch) | |
tree | 56a9a4bf6b4c41531ddcd225f8415024638b38a3 /lib | |
parent | d93c0eb9f3f5d2d2cd78f02422d0c0ed25743e3a (diff) |
Allow changing the display_name, now permanently!
Diffstat (limited to 'lib')
-rw-r--r-- | lib/xmltree.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/xmltree.c b/lib/xmltree.c index f413b8f7..5fd43014 100644 --- a/lib/xmltree.c +++ b/lib/xmltree.c @@ -173,20 +173,20 @@ int xt_handle( struct xt_parser *xt, struct xt_node *node, int depth ) if( node->flags & XT_COMPLETE && !( node->flags & XT_SEEN ) ) { - for( i = 0; xt->handlers[i].func; i ++ ) + if( xt->handlers ) for( i = 0; xt->handlers[i].func; i ++ ) { /* This one is fun! \o/ */ - /* If handler.name == NULL it means it should always match. */ + /* If handler.name == NULL it means it should always match. */ if( ( xt->handlers[i].name == NULL || - /* If it's not, compare. There should always be a name. */ + /* If it's not, compare. There should always be a name. */ g_strcasecmp( xt->handlers[i].name, node->name ) == 0 ) && - /* If handler.parent == NULL, it's a match. */ + /* If handler.parent == NULL, it's a match. */ ( xt->handlers[i].parent == NULL || - /* If there's a parent node, see if the name matches. */ + /* If there's a parent node, see if the name matches. */ ( node->parent ? g_strcasecmp( xt->handlers[i].parent, node->parent->name ) == 0 : - /* If there's no parent, the handler should mention <root> as a parent. */ - g_strcasecmp( xt->handlers[i].parent, "<root>" ) == 0 ) ) ) + /* If there's no parent, the handler should mention <root> as a parent. */ + strcmp( xt->handlers[i].parent, "<root>" ) == 0 ) ) ) { st = xt->handlers[i].func( node, xt->data ); |