mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
Do not clear ranges if editor model is not tehre
This commit is contained in:
@@ -96,8 +96,10 @@ export class RangeHighlightDecorations implements IDisposable {
|
||||
}
|
||||
|
||||
public dispose() {
|
||||
this.removeHighlightRange();
|
||||
this.disposeEditorListeners();
|
||||
this.editor = null;
|
||||
if (this.editor && this.editor.getModel()) {
|
||||
this.removeHighlightRange();
|
||||
this.disposeEditorListeners();
|
||||
this.editor = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user