protect against undefined session; fixes #69128

This commit is contained in:
Andre Weinand
2019-02-21 11:40:50 +01:00
parent 5406a9fa06
commit 4215ed797c
2 changed files with 10 additions and 2 deletions

View File

@@ -593,7 +593,11 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
public async $acceptDebugSessionStarted(sessionDto: IDebugSessionDto): Promise<void> {
const session = await this.getSession(sessionDto);
this._onDidStartDebugSession.fire(session);
if (session) {
this._onDidStartDebugSession.fire(session);
} else {
console.error('undefined session received in acceptDebugSessionStarted'); // should not happen (but see #69128)
}
}
public async $acceptDebugSessionTerminated(sessionDto: IDebugSessionDto): Promise<void> {