aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljscompiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlcompiler/qqmljscompiler.cpp')
-rw-r--r--src/qmlcompiler/qqmljscompiler.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qmlcompiler/qqmljscompiler.cpp b/src/qmlcompiler/qqmljscompiler.cpp
index 8143f588ae..30c869c439 100644
--- a/src/qmlcompiler/qqmljscompiler.cpp
+++ b/src/qmlcompiler/qqmljscompiler.cpp
@@ -674,8 +674,13 @@ std::variant<QQmlJSAotFunction, QList<QQmlJS::DiagnosticMessage>> QQmlJSAotCompi
const QString name = m_document->stringAt(irBinding.propertyNameIndex);
QQmlJSCompilePass::Function function = initializer.run(
context, name, astNode, irBinding, &errors);
- const QQmlJSAotFunction aotFunction = doCompileAndRecordAotStats(
- context, &function, &errors, name, astNode->firstSourceLocation());
+
+ QQmlJSAotFunction aotFunction;
+ if (errors.isEmpty()) {
+ aotFunction = doCompileAndRecordAotStats(
+ context, &function, &errors, name, astNode->firstSourceLocation());
+ }
+
if (!errors.isEmpty()) {
for (auto &error : errors) {