From eab121a9023eee10b49813161867011dc9fb9689 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Thu, 11 Feb 2010 10:58:05 +0100 Subject: QXmlSchema: fix crash in schema parser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit previously, annotations were only supposed to appear within elements of the form ; However, they can also appear in elements of the form Patch-by: Tobias König --- src/xmlpatterns/schema/qxsdschemaparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xmlpatterns/schema/qxsdschemaparser.cpp b/src/xmlpatterns/schema/qxsdschemaparser.cpp index 6d878e8..6ed28af 100644 --- a/src/xmlpatterns/schema/qxsdschemaparser.cpp +++ b/src/xmlpatterns/schema/qxsdschemaparser.cpp @@ -4832,7 +4832,7 @@ XsdTerm::Ptr XsdSchemaParser::parseLocalElement(const XsdParticle::Ptr &particle if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) { const XsdAnnotation::Ptr annotation = parseAnnotation(); - element->addAnnotation(annotation); + term->addAnnotation(annotation); } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) { if (hasRefAttribute) { error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") -- cgit v0.12