diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2020-05-06 13:21:21 +0200 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2020-05-06 13:58:08 +0200 |
commit | 45537009a8a3f8e855c1adf0208084849b6dc9c4 (patch) | |
tree | e1b30dfb0118875bb57be53e3b15348795dfd35c /tools | |
parent | aa470fa92d8139ea849c00e01db5ffc537fe6981 (diff) |
Fix qmllint crash
Fixes: QTBUG-83915
Change-Id: I26731ebcec6be46602b6acc7562c65b1c9f3e43a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmllint/findwarnings.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qmllint/findwarnings.cpp b/tools/qmllint/findwarnings.cpp index 25a4975468..cecbf838d7 100644 --- a/tools/qmllint/findwarnings.cpp +++ b/tools/qmllint/findwarnings.cpp @@ -731,7 +731,7 @@ bool FindWarningVisitor::check() // now that all ids are known, revisit any Connections whose target were perviously unknown for (auto const &outstandingConnection: m_outstandingConnections) { auto targetScope = m_qmlid2scope[outstandingConnection.targetName]; - if (outstandingConnection.scope) + if (outstandingConnection.scope && targetScope != nullptr) outstandingConnection.scope->addMethods(targetScope->methods()); QScopedValueRollback<ScopeTree::Ptr> rollback(m_currentScope, outstandingConnection.scope); outstandingConnection.uiod->initializer->accept(this); |