summaryrefslogtreecommitdiffstats
path: root/parse-xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse-xml.c')
-rw-r--r--parse-xml.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/parse-xml.c b/parse-xml.c
index edb30e112..cd46064b8 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -323,11 +323,13 @@ double ascii_strtod(char *str, char **ptr)
done:
if (!numbers)
goto no_conversion;
- *ptr = p-1;
+ if (ptr)
+ *ptr = p-1;
return sign ? -val : val;
no_conversion:
- *ptr = str;
+ if (ptr)
+ *ptr = str;
return 0.0;
}