diff --git a/src/sql/workbench/parts/notebook/models/clientSession.ts b/src/sql/workbench/parts/notebook/models/clientSession.ts index 81b4b62e7d..c23404c3b5 100644 --- a/src/sql/workbench/parts/notebook/models/clientSession.ts +++ b/src/sql/workbench/parts/notebook/models/clientSession.ts @@ -306,7 +306,7 @@ export class ClientSession implements IClientSession { */ public async shutdown(): Promise { // Always try to shut down session - if (this._session && this._session.id) { + if (this._session && this._session.id && this.notebookManager && this.notebookManager.sessionManager) { await this.notebookManager.sessionManager.shutdown(this._session.id); } }