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>
This commit is contained in:
hjk
2014-04-01 18:42:56 +02:00
parent ee6ecef5fb
commit 1ca022e378

View File

@@ -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"));
}