ecode: Crash fix from an old bug that wasn't breaking anything until now.

This commit is contained in:
Martín Lucas Golini
2023-03-06 17:22:08 -03:00
parent 7c92cf60b9
commit 8eb7b8939f

View File

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