diff options
author | Daniel Veillard <veillard@redhat.com> | 2015-11-20 15:01:22 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2015-11-20 15:01:22 +0800 |
commit | ce0b0d0d81fdbb5f722a890432b52d363e4de57b (patch) | |
tree | 6130fd33f9dc83a8a2dcae41d47763038de54535 | |
parent | e3b1597421ad7cbeb5939fc3b54f43f141c82366 (diff) | |
download | android_external_libxml2-ce0b0d0d81fdbb5f722a890432b52d363e4de57b.tar.gz android_external_libxml2-ce0b0d0d81fdbb5f722a890432b52d363e4de57b.tar.bz2 android_external_libxml2-ce0b0d0d81fdbb5f722a890432b52d363e4de57b.zip |
Do not print error context when there is none
Which now happens more frequently du to xmlHaltParser use
-rw-r--r-- | error.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -177,7 +177,9 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input , xmlChar content[81]; /* space for 80 chars + line terminator */ xmlChar *ctnt; - if (input == NULL) return; + if ((input == NULL) || (input->cur == NULL) || + (*input->cur == 0)) return; + cur = input->cur; base = input->base; /* skip backwards over any end-of-lines */ |