diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp index eb496f9e3d0..56f31d9218e 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.cpp +++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp @@ -526,7 +526,8 @@ SemanticInfo CppEditorSupport::recalculateSemanticInfoNow(const SemanticInfo::So const QSharedPointer snapshotUpdater = snapshotUpdater_internal(); QTC_ASSERT(snapshotUpdater, return newSemanticInfo); newSemanticInfo.snapshot = snapshotUpdater->snapshot(); - QTC_ASSERT(newSemanticInfo.snapshot.contains(source.fileName), return newSemanticInfo); + if (!newSemanticInfo.snapshot.contains(source.fileName)) + return newSemanticInfo; // SnapshotUpdater::update() not yet started. Document::Ptr doc = newSemanticInfo.snapshot.preprocessedDocument(source.code, source.fileName); if (processor)