summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2014-06-10 16:06:14 +0800
committerDaniel Veillard <veillard@redhat.com>2014-06-10 16:06:14 +0800
commita16eb968075a82ec33b2c1e77db8909a35b44620 (patch)
treeb4bc2d2ff5f5193dce08b96f6344f81e04423b41
parentfcb1bb56ff21c6fe5c1dfd49b99445f6128b94e4 (diff)
downloadlibxml2-a16eb968075a82ec33b2c1e77db8909a35b44620.tar.gz
erroneously ignores a validation error if no error callback set
Reported by Stefan Behnel https://bugzilla.gnome.org/show_bug.cgi?id=724903
-rw-r--r--valid.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/valid.c b/valid.c
index aedd9d7a..1e03a7c7 100644
--- a/valid.c
+++ b/valid.c
@@ -2633,11 +2633,8 @@ xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
/*
* The id is already defined in this DTD.
*/
- if ((ctxt != NULL) && (ctxt->error != NULL)) {
- xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED,
- "ID %s already defined\n",
- value, NULL, NULL);
- }
+ xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED,
+ "ID %s already defined\n", value, NULL, NULL);
#endif /* LIBXML_VALID_ENABLED */
xmlFreeID(ret);
return(NULL);