summaryrefslogtreecommitdiffstats
path: root/src/xml/dom/qdom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml/dom/qdom.cpp')
-rw-r--r--src/xml/dom/qdom.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index 7709c28..ac6ba37 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -7406,7 +7406,9 @@ bool QDomHandler::startElement(const QString& nsURI, const QString&, const QStri
} else {
n = doc->createElement(qName);
}
- n->setLocation(locator->lineNumber(), locator->columnNumber());
+
+ if (n)
+ n->setLocation(locator->lineNumber(), locator->columnNumber());
node->appendChild(n);
node = n;
@@ -7426,7 +7428,7 @@ bool QDomHandler::startElement(const QString& nsURI, const QString&, const QStri
bool QDomHandler::endElement(const QString&, const QString&, const QString&)
{
- if (node == doc)
+ if (!node || node == doc)
return false;
node = node->parent();