From 0feb80fa00ad82dcb71300c4aa3278fa8f633608 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 8 Sep 2014 13:40:44 +0200 Subject: [PATCH] CppEditor: Re-add check for editor existence in updateFunctionDeclDefLink Fixes a recent regression. Change-Id: Iaa4eb936274b33057fc6c8fdcfbe751b9ab28b75 Reviewed-by: Fawzi Mohamed Reviewed-by: Christian Stenger --- src/plugins/cppeditor/cppeditor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index 9eecd71476..a48a228ab2 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -671,7 +671,8 @@ void CppEditorWidget::updateFunctionDeclDefLinkNow() if (noTracking) return; - if (EditorManager::currentEditor()->widget() != this) + IEditor *editor = EditorManager::currentEditor(); + if (!editor || editor->widget() != this) return; const Snapshot semanticSnapshot = d->m_lastSemanticInfo.snapshot; -- GitLab