diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp index 834ab243cbf..0d9e2d8bf6e 100644 --- a/src/xml/dom/qdom.cpp +++ b/src/xml/dom/qdom.cpp @@ -1372,7 +1372,7 @@ void QDomNodePrivate::saveSubTree(const QDomNodePrivate *n, QTextStream &s, const QDomNodePrivate *prev = root; root = root->next; // Close QDomElementPrivate groups - while (!root && prev && (layerDepth > 0)) { + while (!root && (layerDepth > 0)) { root = prev->parent(); layerDepth --; root->afterSave(s, layerDepth + branchDepth, indent);