diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-06-24 16:09:29 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-06-24 17:09:35 +0200 |
commit | 9f22767784dc859283b321c47636ea708eef3bfe (patch) | |
tree | e47f68fb1943d913c124da2c48f0195e38345649 /src/qml/types/qqmldelegatemodel_p_p.h | |
parent | cf93acbee66db96a6f7fab8607432b70ec5c0437 (diff) |
Fix crash in QQmlDelegateModel during destruction phase
It has been reported multiple times (with different back traces) that
the QQmlDelegateModel tries to access a dangling QQmlContext pointer.
The scenarios for reaching this point differ slightly, one such scenario
is very late model activity during the scene destruction. The provided
test-case simulates that and the provided patch guards the QQmlContext
in a QPointer.
Task-number: QTBUG-39780
Change-Id: I594ee4918cd1b78c5db5c164314e85e9eea99fbd
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Diffstat (limited to 'src/qml/types/qqmldelegatemodel_p_p.h')
-rw-r--r-- | src/qml/types/qqmldelegatemodel_p_p.h | 2 |
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 d64f641a1b..cf7a719455 100644 --- a/src/qml/types/qqmldelegatemodel_p_p.h +++ b/src/qml/types/qqmldelegatemodel_p_p.h @@ -303,7 +303,7 @@ public: QQmlListCompositor m_compositor; QQmlComponent *m_delegate; QQmlDelegateModelItemMetaType *m_cacheMetaType; - QQmlContext *m_context; + QPointer<QQmlContext> m_context; QQmlDelegateModelParts *m_parts; QQmlDelegateModelGroupEmitterList m_pendingParts; |