From 577ae81f3fd9698dc4483bb080b5ac2d341ad752 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 31 Jul 2003 09:05:45 +0000 Subject: [PATCH] always return a string from parse_string --- parser/parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.45.2