From: Dana Jansens Date: Thu, 31 Jul 2003 09:05:45 +0000 (+0000) Subject: always return a string from parse_string X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=577ae81f3fd9698dc4483bb080b5ac2d341ad752;p=chaz%2Fopenbox always return a string from parse_string --- diff --git a/parser/parse.c b/parser/parse.c index 07ce0736..48db4ecd 100644 --- a/parser/parse.c +++ b/parser/parse.c @@ -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; }