From a5c0f16d75cc8250609bb358e239a9b224aba7ec Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 22 Sep 2022 11:24:35 +0200 Subject: [PATCH] CppEditor: Check document before access Amends f99e17efa4118ead537f69aa659a78241dd0488f. Fixes: QTCREATORBUG-28197 Change-Id: I7a3561b5ff5b7635f419f1252595c639fe7254bf Reviewed-by: Christian Stenger --- src/plugins/cppeditor/cppeditorwidget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/cppeditor/cppeditorwidget.cpp b/src/plugins/cppeditor/cppeditorwidget.cpp index 0259269572b..193e0d7735a 100644 --- a/src/plugins/cppeditor/cppeditorwidget.cpp +++ b/src/plugins/cppeditor/cppeditorwidget.cpp @@ -837,6 +837,9 @@ void CppEditorWidget::switchDeclarationDefinition(bool inNextSplit) bool CppEditorWidget::followQrcUrl(const QTextCursor &cursor, const Utils::LinkHandler &processLinkCallback) { + if (!isSemanticInfoValidExceptLocalUses()) + return false; + const Project * const project = ProjectTree::currentProject(); if (!project || !project->rootProjectNode()) return false;