aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/qml/qqmlcustomparser.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlcustomparser.cpp b/src/qml/qml/qqmlcustomparser.cpp
index f284a82dbe..d3f43cb8c4 100644
--- a/src/qml/qml/qqmlcustomparser.cpp
+++ b/src/qml/qml/qqmlcustomparser.cpp
@@ -154,6 +154,7 @@ int QQmlCustomParser::evaluateEnum(const QString &script, bool *ok) const
// enums.
const QUrl documentUrl = validator ? validator->documentSourceUrl() : QUrl();
if (documentUrl.isValid() && documentUrl == type.sourceUrl()) {
+ Q_ASSERT(validator);
const QQmlPropertyCache::ConstPtr rootCache = validator->rootPropertyCache();
const int count = rootCache->qmlEnumCount();
for (int ii = 0; ii < count; ++ii) {