diff options
author | Florian Hänel <florian.haenel@basyskom.com> | 2013-06-03 13:40:09 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-07 21:28:59 +0200 |
commit | e4fc75edaedead3092aace3a29a0aafdd0e86a77 (patch) | |
tree | 7479a631e81254df9f7579ee2128b5c7ff77042f | |
parent | 837b76fa4dd4a904e0c29f93fca5de1d642a84e3 (diff) |
Fix null-pointer access in QQuickVisualDataModelPrivate
I observed null cachItem->contextData which lead to null-pointer access
on cacheItem->contextData->destroy().
Task-number: QTBUG-31439
Change-Id: I91f28a3ee1ac83446ecde1801a1cb7962fb883f3
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
-rw-r--r-- | src/qml/types/qqmldelegatemodel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index 279e2ea884..747c9391e9 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -854,7 +854,8 @@ void QQmlDelegateModelPrivate::incubatorStatusChanged(QQDMIncubationTask *incuba delete cacheItem->object; cacheItem->object = 0; cacheItem->scriptRef -= 1; - cacheItem->contextData->destroy(); + if (cacheItem->contextData) + cacheItem->contextData->destroy(); cacheItem->contextData = 0; if (!cacheItem->isReferenced()) { |