diff --git a/src/vs/workbench/services/history/browser/history.ts b/src/vs/workbench/services/history/browser/history.ts index 70abc8259d890b9269aa9f636550a65bb34351e4..c41a3ec1265bf4bf246d0b0ac1b9e4485c68a22c 100644 --- a/src/vs/workbench/services/history/browser/history.ts +++ b/src/vs/workbench/services/history/browser/history.ts @@ -500,6 +500,10 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic } private save(): void { + if (!this.history) { + return; // nothing to save because history was not used + } + let entries: ISerializedEditorInput[] = this.history.map((input: EditorInput) => { let factory = this.registry.getEditorInputFactory(input.getTypeId()); if (factory) {