summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/cppeditor/cppuseselectionsupdater.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cppuseselectionsupdater.cpp b/src/plugins/cppeditor/cppuseselectionsupdater.cpp
index b2ceccfcdb..f77b9efc6a 100644
--- a/src/plugins/cppeditor/cppuseselectionsupdater.cpp
+++ b/src/plugins/cppeditor/cppuseselectionsupdater.cpp
@@ -260,7 +260,10 @@ void CppUseSelectionsUpdater::update(CallType callType)
const Document::Ptr document = semanticInfo.doc;
const Snapshot snapshot = semanticInfo.snapshot;
- if (!document || document->editorRevision() != static_cast<unsigned>(textDocument()->revision()))
+ if (!document)
+ return;
+
+ if (semanticInfo.revision != static_cast<unsigned>(textDocument()->revision()))
return;
QTC_ASSERT(document->translationUnit(), return);