]> Dogcows Code - chaz/openbox/commitdiff
always return a string from parse_string
authorDana Jansens <danakj@orodu.net>
Thu, 31 Jul 2003 09:05:45 +0000 (09:05 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 31 Jul 2003 09:05:45 +0000 (09:05 +0000)
parser/parse.c

index 07ce0736d89bc91c4bf921a34f51dea6ae101c6c..48db4ecd2acdcc62c2eefcd4402940ee801beced 100644 (file)
@@ -109,7 +109,7 @@ void parse_tree(xmlDocPtr doc, xmlNodePtr node, void *nothing)
 char *parse_string(xmlDocPtr doc, xmlNodePtr node)
 {
     xmlChar *c = xmlNodeListGetString(doc, node->xmlChildrenNode, TRUE);
-    char *s = g_strdup((char*)c);
+    char *s = g_strdup(c ? (char*)c : "");
     xmlFree(c);
     return s;
 }
This page took 0.022098 seconds and 4 git commands to generate.