mirror of
https://github.com/atom/atom.git
synced 2026-02-12 15:45:23 -05:00
Account for a window being destroyed before an IPC message is delivered
This commit is contained in:
@@ -657,7 +657,7 @@ class AtomApplication extends EventEmitter {
|
||||
|
||||
this.disposable.add(ipcHelpers.on(ipcMain, 'window-command', (event, command, ...args) => {
|
||||
const window = BrowserWindow.fromWebContents(event.sender)
|
||||
return window.emit(command, ...args)
|
||||
return window && window.emit(command, ...args)
|
||||
}))
|
||||
|
||||
this.disposable.add(ipcHelpers.respondTo('window-method', (browserWindow, method, ...args) => {
|
||||
|
||||
Reference in New Issue
Block a user