diff --git a/src/vs/workbench/api/electron-browser/mainThreadComments.ts b/src/vs/workbench/api/electron-browser/mainThreadComments.ts index 443d7c8cc5d..75111969d09 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadComments.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadComments.ts @@ -50,6 +50,10 @@ export class MainThreadComments extends Disposable implements MainThreadComments } const id = editor.getId(); const model = editor.getModel(); + if (model === null) { + return; + } + if (editors.filter(ed => ed.getId() === id).length > 0) { // it's an active editor, we are going to update this editor's comments anyways } else {