From: Dana Jansens Date: Mon, 4 Jun 2007 15:21:16 +0000 (+0000) Subject: when an integer field is empty return 0, not signal 11 X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=b645e3720d497fa0111c1b34f0484d1b17358d14;p=chaz%2Fopenbox when an integer field is empty return 0, not signal 11 --- diff --git a/parser/parse.c b/parser/parse.c index 85ffc151..196ba93b 100644 --- a/parser/parse.c +++ b/parser/parse.c @@ -242,7 +242,7 @@ gchar *parse_string(xmlDocPtr doc, xmlNodePtr node) gint parse_int(xmlDocPtr doc, xmlNodePtr node) { xmlChar *c = xmlNodeListGetString(doc, node->children, TRUE); - gint i = atoi((gchar*)c); + gint i = c ? atoi((gchar*)c) : 0; xmlFree(c); return i; }