1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-13 20:58:16 +03:00

Do not print error context when there is none

Which now happens more frequently du to xmlHaltParser use
This commit is contained in:
Daniel Veillard 2015-11-20 15:01:22 +08:00
parent e3b1597421
commit ce0b0d0d81

View File

@ -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 */