]> Dogcows Code - chaz/openbox/blobdiff - parser/parse.c
when a bool field is empty return false, not signal 11.. :|
[chaz/openbox] / parser / parse.c
index 196ba93b43e2015310071c9de7d4c78da908a260..f2dcb09d86e2798f9c1fe31bdcc86da823efe070 100644 (file)
@@ -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;
This page took 0.019989 seconds and 4 git commands to generate.