summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools')
-rw-r--r--src/plugins/cpptools/cpptoolseditorsupport.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp
index eb496f9e3d..56f31d9218 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 = 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)