aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 5965431512..bff726cb98 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -2300,9 +2300,13 @@ QQmlPropertyCache *QQmlEnginePrivate::rawPropertyCacheForType(int t, QTypeRevisi
if (!type.isValid())
return nullptr;
- return type.containsRevisionedAttributes()
- ? QQmlMetaType::propertyCache(type, version)
- : cache(type.metaObject(), version);
+ if (type.containsRevisionedAttributes())
+ return QQmlMetaType::propertyCache(type, version);
+
+ if (const QMetaObject *metaObject = type.metaObject())
+ return cache(metaObject, version);
+
+ return nullptr;
}
QQmlPropertyCache *QQmlEnginePrivate::findPropertyCacheInCompositeTypes(int t) const