diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-06-11 16:01:18 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-06-11 16:01:18 +0200 |
commit | 9b43b55dc0ac4457d05da0c422854754addc2aa9 (patch) | |
tree | 84b924487688c15ef1329aab77a316489136df7f /src/plugins/qmljseditor | |
parent | 168e89e0a2bd475a4f4b7bf4aa6f207466e8a9bd (diff) | |
parent | 4cba1d7c71484cc7250d9a7b12efa174817bdc95 (diff) |
Merge remote-tracking branch 'origin/4.7'
Change-Id: I762dbddb0f337e9a5fc4b113c7876813e9f45c9c
Diffstat (limited to 'src/plugins/qmljseditor')
-rw-r--r-- | src/plugins/qmljseditor/qmljseditordocument.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/qmljseditor/qmljseditordocument.cpp b/src/plugins/qmljseditor/qmljseditordocument.cpp index 03f5904981..9345042c11 100644 --- a/src/plugins/qmljseditor/qmljseditordocument.cpp +++ b/src/plugins/qmljseditor/qmljseditordocument.cpp @@ -595,6 +595,10 @@ void QmlJSEditorDocumentPrivate::updateOutlineModel() static void cleanMarks(QVector<TextEditor::TextMark *> *marks, TextEditor::TextDocument *doc) { + // if doc is null, this method is improperly called, so better do nothing that leave an + // inconsistent state where marks are cleared but not removed from doc. + if (!marks || !doc) + return; for (TextEditor::TextMark *mark : *marks) { doc->removeMark(mark); delete mark; |