From 1ca022e3785793ad23f5efc0461b4e6b5c6da122 Mon Sep 17 00:00:00 2001
From: hjk <hjk121@nokiamail.com>
Date: Tue, 1 Apr 2014 18:42:56 +0200
Subject: [PATCH] FakeVim: Check handler pointer before using it

Shouldn't happen in that case. But better safe than sorry.

Change-Id: I8461fec32c23e7efe6c949724cf522b58b703acc
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
---
 src/plugins/fakevim/fakevimplugin.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp
index 756121aeef2..1ec80f51079 100644
--- a/src/plugins/fakevim/fakevimplugin.cpp
+++ b/src/plugins/fakevim/fakevimplugin.cpp
@@ -2123,6 +2123,7 @@ void FakeVimPluginPrivate::showExtraInformation(const QString &text)
     IEditor *iedit = EditorManager::openEditorWithContents(Id(), &title, text.toUtf8());
     EditorManager::activateEditor(iedit);
     FakeVimHandler *handler = m_editorToHandler.value(iedit, 0);
+    QTC_ASSERT(handler, return);
     handler->handleCommand(_("0"));
 }
 
-- 
GitLab