From bf8888971732dbd0012eadc53cddada59bb17b2e Mon Sep 17 00:00:00 2001 From: Maximilian Goldstein Date: Wed, 3 Feb 2021 12:06:33 +0100 Subject: qmllint: Fix segmentation fault Change-Id: Ie04ad4221b25628687c2575facf90488b83d21bf Reviewed-by: Fabian Kosmale (cherry picked from commit 5fb34b67b810ca284c216009925f4f38220c4510) --- tools/qmllint/checkidentifiers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/qmllint/checkidentifiers.cpp b/tools/qmllint/checkidentifiers.cpp index e78ebdae90..b41b68b719 100644 --- a/tools/qmllint/checkidentifiers.cpp +++ b/tools/qmllint/checkidentifiers.cpp @@ -252,7 +252,7 @@ bool CheckIdentifiers::checkMemberAccess(const QVector &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; -- cgit v1.2.3