You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
918 B
32 lines
918 B
7 years ago
|
From c5031779667ff362d670e34a42e9bc4f5a430793 Mon Sep 17 00:00:00 2001
|
||
|
From: Daniel Veillard <veillard@redhat.com>
|
||
|
Date: Fri, 20 Nov 2015 15:01:22 +0800
|
||
|
Subject: [PATCH] Do not print error context when there is none
|
||
|
To: libvir-list@redhat.com
|
||
|
|
||
|
Which now happens more frequently du to xmlHaltParser use
|
||
|
|
||
|
Signed-off-by: Daniel Veillard <veillard@redhat.com>
|
||
|
---
|
||
|
error.c | 4 +++-
|
||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/error.c b/error.c
|
||
|
index cbcf5c9..9c45040 100644
|
||
|
--- a/error.c
|
||
|
+++ b/error.c
|
||
|
@@ -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 */
|
||
|
--
|
||
|
2.5.0
|
||
|
|