mirror of
https://github.com/atom/atom.git
synced 2026-01-26 23:38:48 -05:00
Null guard AtomWindow instance in window-method ipc handler
Since things are async, I think the window could potentially disappear before we can handle the message.
This commit is contained in:
@@ -294,7 +294,7 @@ class AtomApplication
|
||||
win.emit(command, args...)
|
||||
|
||||
@disposable.add ipcHelpers.respondTo 'window-method', (browserWindow, method, args...) =>
|
||||
@atomWindowForBrowserWindow(browserWindow)[method](args...)
|
||||
@atomWindowForBrowserWindow(browserWindow)?[method](args...)
|
||||
|
||||
@disposable.add ipcHelpers.on ipcMain, 'pick-folder', (event, responseChannel) =>
|
||||
@promptForPath "folder", (selectedPaths) ->
|
||||
|
||||
Reference in New Issue
Block a user