aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2021-02-03 12:06:33 +0100
committerMaximilian Goldstein <max.goldstein@qt.io>2021-02-04 10:57:03 +0100
commit067c236c746ca37de4fcdddfbd894546697273a1 (patch)
tree3e1ee3955f073f382ba800249ffb497a96caf534 /tools
parent232634984e04deab21c40b99ac637a744416d51d (diff)
qmllint: Fix segmentation fault
Change-Id: Ie04ad4221b25628687c2575facf90488b83d21bf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 5fb34b67b810ca284c216009925f4f38220c4510)
Diffstat (limited to 'tools')
-rw-r--r--tools/qmllint/checkidentifiers.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qmllint/checkidentifiers.cpp b/tools/qmllint/checkidentifiers.cpp
index 6500595c83..7e49a4fb4a 100644
--- a/tools/qmllint/checkidentifiers.cpp
+++ b/tools/qmllint/checkidentifiers.cpp
@@ -252,7 +252,7 @@ bool CheckIdentifiers::checkMemberAccess(const QVector<FieldMember> &members,
if (access.m_name.front().isUpper() && scope->scopeType() == QQmlJSScope::QMLScope) {
// may be an attached type
const auto it = m_types.find(access.m_name);
- if (it != m_types.end() && !(*it)->attachedTypeName().isEmpty()) {
+ if (it != m_types.end() && *it && !(*it)->attachedTypeName().isEmpty()) {
if (const auto attached = (*it)->attachedType()) {
scope = attached;
continue;