diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index 26284ca0a98..5589c538331 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -330,7 +330,9 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { // Retry one more time in case the terminal has not yet been initialized. setTimeout(() => { terminal = this._getTerminalById(id); - terminal._setProcessId(processId); + if (terminal) { + terminal._setProcessId(processId); + } }, EXT_HOST_CREATION_DELAY); } }