mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
window - do not send IPC messages to destroyed windows (fix #114564)
This commit is contained in:
@@ -271,7 +271,6 @@ export class CodeApplication extends Disposable {
|
||||
//#region Bootstrap IPC Handlers
|
||||
|
||||
ipcMain.on('vscode:fetchShellEnv', async event => {
|
||||
const webContents = event.sender;
|
||||
const window = this.windowsMainService?.getWindowByWebContents(event.sender);
|
||||
|
||||
let replied = false;
|
||||
@@ -283,9 +282,7 @@ export class CodeApplication extends Disposable {
|
||||
if (!replied) {
|
||||
replied = true;
|
||||
|
||||
if (!webContents.isDestroyed()) {
|
||||
webContents.send('vscode:acceptShellEnv', env);
|
||||
}
|
||||
window?.send('vscode:acceptShellEnv', env);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user