summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2015-05-16 16:09:01 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2015-05-16 16:09:01 +0200
commit27bc74a0433b143ce1744698e3c331e907a7fb3f (patch)
treebe1c9bd47a89163d9d22a0375165cd85c3e1d457
parentd4f666484cd690b15ea9725bed46c6bbc46c8fd8 (diff)
xml: only call data handler if set
-rw-r--r--xml.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xml.c b/xml.c
index 660a279..0c7b58b 100644
--- a/xml.c
+++ b/xml.c
@@ -314,7 +314,8 @@ xmlparser_parse(XMLParser *x)
if(c == '&') {
if(datalen) {
x->data[datalen] = '\0';
- x->xmldata(x, x->data, datalen);
+ if(x->xmldata)
+ x->xmldata(x, x->data, datalen);
}
x->data[0] = c;
datalen = 1;