summaryrefslogtreecommitdiffstats
path: root/src/xml/dom
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml/dom')
-rw-r--r--src/xml/dom/qdom.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index d8a7bc5b5a..25638717a0 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -7541,6 +7541,8 @@ bool QDomHandler::unparsedEntityDecl(const QString &name, const QString &publicI
{
QDomEntityPrivate* e = new QDomEntityPrivate(doc, 0, name,
publicId, systemId, notationName);
+ // keep the refcount balanced: appendChild() does a ref anyway.
+ e->ref.deref();
doc->doctype()->appendChild(e);
return true;
}