aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmltypedata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmltypedata.cpp')
-rw-r--r--src/qml/qml/qqmltypedata.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/qqmltypedata.cpp b/src/qml/qml/qqmltypedata.cpp
index 9d44e85ba4..7b21edec37 100644
--- a/src/qml/qml/qqmltypedata.cpp
+++ b/src/qml/qml/qqmltypedata.cpp
@@ -934,7 +934,8 @@ QQmlError QQmlTypeData::buildTypeResolutionCaches(
ref->type = qmlType;
if (qmlType.isValid()) {
// this is required for inline components in singletons
- auto typeID = qmlType.lookupInlineComponentById(qmlType.inlineComponendId()).typeId();
+ auto type = qmlType.lookupInlineComponentById(qmlType.inlineComponendId()).typeId();
+ auto typeID = type.isValid() ? type.id() : -1;
auto exUnit = engine->obtainExecutableCompilationUnit(typeID);
if (exUnit) {
ref->compilationUnit = exUnit;