aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlcontext.cpp')
-rw-r--r--src/qml/qml/qqmlcontext.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlcontext.cpp b/src/qml/qml/qqmlcontext.cpp
index 3710cee162..d308e85673 100644
--- a/src/qml/qml/qqmlcontext.cpp
+++ b/src/qml/qml/qqmlcontext.cpp
@@ -51,6 +51,7 @@
#include <qjsengine.h>
#include <QtCore/qvarlengtharray.h>
#include <private/qmetaobject_p.h>
+#include <QtQml/private/qqmlcontext_p.h>
#include <QtCore/qdebug.h>
QT_BEGIN_NAMESPACE
@@ -562,8 +563,8 @@ void QQmlContextData::emitDestruction()
emit a->destruction();
}
- QQmlContextData * child = childContexts;
- while (child) {
+ QQmlContextDataRef child = childContexts;
+ while (!child.isNull()) {
child->emitDestruction();
child = child->nextChild;
}