Fix accessing disposed model

This commit is contained in:
Alex Dima
2016-03-15 11:37:15 +01:00
parent e9a80467e3
commit 0bb7ffc26b

View File

@@ -260,6 +260,10 @@ export class MainThreadTextEditor {
}
private _readConfiguration(model:EditorCommon.IModel, codeEditor:EditorCommon.ICommonCodeEditor): IResolvedTextEditorConfiguration {
if (model.isDisposed()) {
// shutdown time
return this._configuration;
}
let cursorStyle = this._configuration ? this._configuration.cursorStyle : EditorCommon.TextEditorCursorStyle.Line;
if (codeEditor) {
let codeEditorOpts = codeEditor.getConfiguration();