]> Dogcows Code - chaz/openbox/commitdiff
when an integer field is empty return 0, not signal 11
authorDana Jansens <danakj@orodu.net>
Mon, 4 Jun 2007 15:21:16 +0000 (15:21 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 4 Jun 2007 15:21:16 +0000 (15:21 +0000)
parser/parse.c

index 85ffc15168e2b2b2b57d558b325ce2205b0ae230..196ba93b43e2015310071c9de7d4c78da908a260 100644 (file)
@@ -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;
 }
This page took 0.022863 seconds and 4 git commands to generate.