diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2024-02-28 16:02:18 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-03-18 16:59:21 +0100 |
commit | 34e3a1d71cda07978590971af4f0d043498ae0cc (patch) | |
tree | 65dd9de0623c4f1486941b383e52f55da7fd4fb9 /src/qml/qml/qqml.cpp | |
parent | 1ca0cf55f9d26650f0e5fb58c3837ad5288a7268 (diff) |
QtQml: Assert on ddata and ddata->propertyCache in doPopulateDeferred()
The caller has to guarantee that the ddata and property cache ar alive
at that point. Therefore, make sure that qmlExecuteDeferred() and
QtQuickPrivate::beginDeferred() actually guarantee as much.
Coverity-Id: 437884
Change-Id: I89bfa5ca47347416d0acd023d073d524363a0635
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/qml/qml/qqml.cpp')
-rw-r--r-- | src/qml/qml/qqml.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp index be41216e54..51bccc2088 100644 --- a/src/qml/qml/qqml.cpp +++ b/src/qml/qml/qqml.cpp @@ -58,6 +58,9 @@ void qmlExecuteDeferred(QObject *object) return; } + if (!data->propertyCache) + data->propertyCache = QQmlMetaType::propertyCache(object->metaObject()); + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(data->context->engine()); QQmlComponentPrivate::DeferredState state; |