Commit d8077db3 authored by Nikolai Kosjar's avatar Nikolai Kosjar Committed by hjk

CppTools: Fix crash for documents without file paths

Since commit 566be099 we might reparse the current document if the
current editor changes. This is fine as long as the current document has
a file path, which is not always true, especially for the documents
created in the FakeVim tests.

Task-number: QTCREATORBUG-10767
Change-Id: Ibe00ef8bb6a144e2ba09b311025d238c2dcde112
Reviewed-by: default avatarChristian Stenger <>
Reviewed-by: default avatarhjk <>
parent d8d71b41
......@@ -286,7 +286,7 @@ static void parse(QFutureInterface<void> &future, CppEditorSupport *support)
QSharedPointer<SnapshotUpdater> updater = support->snapshotUpdater();
......@@ -298,7 +298,7 @@ void CppEditorSupport::updateDocumentNow()
} else {
if (m_fileIsBeingReloaded)
if (m_fileIsBeingReloaded || fileName().isEmpty())
if (m_highlightingSupport && !m_highlightingSupport->requiresSemanticInfo())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment