forked from qt-creator/qt-creator
FakeVim: Avoid possible nullptr access
Amends 9f0919c4a3
.
Fixes: QTCREATORBUG-30730
Change-Id: I389412a0b069fd34a625075d97c89f106c5b5f74
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1502,7 +1502,7 @@ void FakeVimPlugin::editorOpened(IEditor *editor)
|
||||
|
||||
handler->modeChanged.set([tew, this, editor](bool insertMode) {
|
||||
HandlerAndData &handlerAndData = m_editorToHandler[editor];
|
||||
if (!handlerAndData.handler->inFakeVimMode())
|
||||
if (!handlerAndData.handler || !handlerAndData.handler->inFakeVimMode())
|
||||
return;
|
||||
|
||||
// We don't want to show suggestions unless we are in insert mode.
|
||||
|
Reference in New Issue
Block a user