From 182bacc4d0b41ed6779ffe7ae9ec7b2a56f6b48b Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 31 Dec 2018 20:15:40 -0800 Subject: [PATCH] Fix NPE on OS resume --- .../parts/terminal/electron-browser/terminalService.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts index 1cde5cc9375..53a7eaecb0a 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts @@ -70,7 +70,11 @@ export class TerminalService extends AbstractTerminalService implements ITermina } }); ipc.on('vscode:osResume', () => { - this.getActiveTab().terminalInstances.forEach(instance => instance.forceRedraw()); + const activeTab = this.getActiveTab(); + if (!activeTab) { + return; + } + activeTab.terminalInstances.forEach(instance => instance.forceRedraw()); }); }