aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qqmldelegatemodel_p_p.h
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2014-04-17 10:24:35 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-18 07:39:17 +0200
commit2776d48b7a1586518e9add43f723ecc6987f4418 (patch)
tree7914e9d7067ac6a45f21f645f9ac6ed52e0e8265 /src/qml/types/qqmldelegatemodel_p_p.h
parent37e4975e5f43a85e81109b115bfe10d371d0bf89 (diff)
Prevent a crash when the item is deleted but not removed from cache
If the item is not removed from the cache when it is deleted then the cache can end up pointing to an invalid item which when accessed will cause a crash. Task-number: QTBUG-38430 [ChangeLog][QtQml] Prevent a crash when the item is deleted but is not removed from the QQmlDelegateModel's cache. Change-Id: I8cf76b014be62a432d909a3573231cec84a6d678 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'src/qml/types/qqmldelegatemodel_p_p.h')
-rw-r--r--src/qml/types/qqmldelegatemodel_p_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/types/qqmldelegatemodel_p_p.h b/src/qml/types/qqmldelegatemodel_p_p.h
index 32b1154d30..7da089c9b8 100644
--- a/src/qml/types/qqmldelegatemodel_p_p.h
+++ b/src/qml/types/qqmldelegatemodel_p_p.h
@@ -144,7 +144,7 @@ public:
QQmlDelegateModelItemMetaType * const metaType;
QQmlContextData *contextData;
QObject *object;
- QQmlDelegateModelAttached *attached;
+ QPointer<QQmlDelegateModelAttached> attached;
QQDMIncubationTask *incubationTask;
int objectRef;
int scriptRef;