summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xplist.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/xplist.c b/src/xplist.c
index 87b21bb..36db07d 100644
--- a/src/xplist.c
+++ b/src/xplist.c
@@ -728,6 +728,14 @@ static void node_from_xml(parse_ctx ctx, plist_t *plist)
} else if (!strcmp(tag, XPLIST_REAL)) {
if (!is_empty) {
char *strval = get_text_content(ctx, tag, 1, 0);
+ if (!strval) {
+ PLIST_XML_ERR("Couldn't get text content for '%s' node\n", tag);
+ ctx->pos = ctx->end;
+ ctx->err++;
+ free(tag);
+ free(keyname);
+ return;
+ }
data->realval = atof((char *) strval);
free(strval);
}