From 27bc74a0433b143ce1744698e3c331e907a7fb3f Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sat, 16 May 2015 16:09:01 +0200 Subject: xml: only call data handler if set --- xml.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3