diff options
author | Oleg Shparber <[email protected]> | 2014-06-17 15:47:43 -0700 |
---|---|---|
committer | Oleg Shparber <[email protected]> | 2014-06-19 20:53:36 +0200 |
commit | a560018d08d4212bc65c163eb608639f19b38df2 (patch) | |
tree | 05971777203b0390f4dfbc08a6aebaf59dec07bf | |
parent | fdedb07d73c3bf8e816fc0bb99497576bb3f89f9 (diff) |
Fix crash in QObjectWrapper
This can happen during QObject destruction, when
QObjectPrivate::deleteChildren() itself sets entries
in the children list to zero when deleting. These
zeros cause crash in markChildQObjectsRecursively().
Task-number: QTBUG-38635
Change-Id: I29ad9e793b78ca4e8d73fbb125f46db1b8292f20
Reviewed-by: Alan Alpert <[email protected]>
-rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index a02424a3dc..d64f821a38 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -962,6 +962,8 @@ static void markChildQObjectsRecursively(QObject *parent, QV4::ExecutionEngine * const QObjectList &children = parent->children(); for (int i = 0; i < children.count(); ++i) { QObject *child = children.at(i); + if (!child) + continue; QQmlData *ddata = QQmlData::get(child, /*create*/false); if (ddata) ddata->jsWrapper.markOnce(e); |