diff --git a/src/plugins/qmljseditor/qmljseditordocument.cpp b/src/plugins/qmljseditor/qmljseditordocument.cpp index 66fa6da393e..4ca53d2ce3b 100644 --- a/src/plugins/qmljseditor/qmljseditordocument.cpp +++ b/src/plugins/qmljseditor/qmljseditordocument.cpp @@ -501,6 +501,10 @@ QmlJSEditorDocumentPrivate::~QmlJSEditorDocumentPrivate() { m_semanticInfoUpdater->abort(); m_semanticInfoUpdater->wait(); + // clean up all marks, otherwise a callback could try to access deleted members. + // see QTCREATORBUG-20199 + cleanDiagnosticMarks(); + cleanSemanticMarks(); } void QmlJSEditorDocumentPrivate::invalidateFormatterCache()