From 8eb7b8939fcdaf7f4437e8ef50857b5f9ac834ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Mon, 6 Mar 2023 17:22:08 -0300 Subject: [PATCH] ecode: Crash fix from an old bug that wasn't breaking anything until now. --- src/tools/ecode/plugins/lsp/lspclientplugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/ecode/plugins/lsp/lspclientplugin.cpp b/src/tools/ecode/plugins/lsp/lspclientplugin.cpp index 3cb570fb9..2bcb11361 100644 --- a/src/tools/ecode/plugins/lsp/lspclientplugin.cpp +++ b/src/tools/ecode/plugins/lsp/lspclientplugin.cpp @@ -954,7 +954,7 @@ void LSPClientPlugin::onUnregister( UICodeEditor* editor ) { if ( mClosing ) return; Lock l( mDocMutex ); - TextDocument* doc = mEditorDocs[editor]; + TextDocument* doc = &editor->getDocument(); const auto& cbs = mEditors[editor]; for ( auto listener : cbs ) editor->removeEventListener( listener );