summaryrefslogtreecommitdiff
path: root/src/xmlpatterns
diff options
context:
space:
mode:
authorPeter Hartmann <peter.hartmann@nokia.com>2010-02-11 10:58:05 +0100
committerPeter Hartmann <peter.hartmann@nokia.com>2010-02-11 11:27:10 +0100
commiteab121a9023eee10b49813161867011dc9fb9689 (patch)
tree6f7c9f7f78e816e28b723f43af6e70d6d2054cf1 /src/xmlpatterns
parentc0179a6f640a3a88550656884d0bb5065e6b048a (diff)
downloadqt4-tools-eab121a9023eee10b49813161867011dc9fb9689.tar.gz
QXmlSchema: fix crash in schema parser
previously, annotations were only supposed to appear within elements of the form <element name="..."> ; However, they can also appear in elements of the form <element ref="foo:bar"> Patch-by: Tobias König <tokoe@kde.org>
Diffstat (limited to 'src/xmlpatterns')
-rw-r--r--src/xmlpatterns/schema/qxsdschemaparser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xmlpatterns/schema/qxsdschemaparser.cpp b/src/xmlpatterns/schema/qxsdschemaparser.cpp
index 6d878e8020..6ed28af708 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.")