forked from qt-creator/qt-creator
LanguageClient: prevent updating closed document
Remove the closed document from the container that tracks document modifications to prevent accessing a deleted document. Change-Id: Iafba8ad3ce054761017a8feca28fdc4c8b379ef6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -647,6 +647,7 @@ void Client::closeDocument(TextEditor::TextDocument *document)
|
|||||||
{
|
{
|
||||||
deactivateDocument(document);
|
deactivateDocument(document);
|
||||||
d->m_postponedDocuments.remove(document);
|
d->m_postponedDocuments.remove(document);
|
||||||
|
d->m_documentsToUpdate.erase(document);
|
||||||
if (d->m_openedDocument.remove(document) != 0) {
|
if (d->m_openedDocument.remove(document) != 0) {
|
||||||
handleDocumentClosed(document);
|
handleDocumentClosed(document);
|
||||||
if (d->m_state == Initialized)
|
if (d->m_state == Initialized)
|
||||||
|
Reference in New Issue
Block a user