Do not clear ranges if editor model is not tehre

This commit is contained in:
Sandeep Somavarapu
2017-01-04 13:03:25 +01:00
parent 092f92d827
commit b46de2cd57

View File

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