Commit df582f88 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

CppEditor: Fix potential null pointer dereference

Detected by Address Sanitizer.

Change-Id: Ieab9c201e1fe6a7cf5c32747b2ce3d4562f4e598
Reviewed-by: default avatarOrgad Shaneh <>
parent 9b30795c
......@@ -291,7 +291,9 @@ ExtensionSystem::IPlugin::ShutdownFlag CppEditorPlugin::aboutToShutdown()
static CppEditorWidget *currentCppEditorWidget()
return qobject_cast<CppEditorWidget*>(EditorManager::currentEditor()->widget());
if (IEditor *currentEditor = EditorManager::currentEditor())
return qobject_cast<CppEditorWidget*>(currentEditor->widget());
return 0;
void CppEditorPlugin::switchDeclarationDefinition()
Supports Markdown
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