From: Dana Jansens Date: Mon, 4 Jun 2007 15:22:20 +0000 (+0000) Subject: when a bool field is empty return false, not signal 11.. :| X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=62e068eabd23405bf5378165892a337926b3ec24;p=chaz%2Fopenbox when a bool field is empty return false, not signal 11.. :| --- diff --git a/parser/parse.c b/parser/parse.c index 196ba93b..f2dcb09d 100644 --- a/parser/parse.c +++ b/parser/parse.c @@ -251,11 +251,11 @@ gboolean parse_bool(xmlDocPtr doc, xmlNodePtr node) { xmlChar *c = xmlNodeListGetString(doc, node->children, TRUE); gboolean b = FALSE; - if (!xmlStrcasecmp(c, (const xmlChar*) "true")) + if (c && !xmlStrcasecmp(c, (const xmlChar*) "true")) b = TRUE; - else if (!xmlStrcasecmp(c, (const xmlChar*) "yes")) + else if (c && !xmlStrcasecmp(c, (const xmlChar*) "yes")) b = TRUE; - else if (!xmlStrcasecmp(c, (const xmlChar*) "on")) + else if (c && !xmlStrcasecmp(c, (const xmlChar*) "on")) b = TRUE; xmlFree(c); return b;