Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #12885 from brave/fix/12883
Browse files Browse the repository at this point in the history
always check isDestroyed in callbacks
  • Loading branch information
bsclifton committed Jan 28, 2018
1 parent 649c35d commit 455f252
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ function registerForDownloadListener (session) {
}
const state = item.isPaused() ? downloadStates.PAUSED : downloadStates.IN_PROGRESS
updateDownloadState(win, downloadId, item, state)
if (win) {
if (win && !win.isDestroyed() && !win.webContents.isDestroyed()) {
win.webContents.send(messages.SHOW_DOWNLOADS_TOOLBAR)
}
item.on('removed', function () {
Expand Down

0 comments on commit 455f252

Please sign in to comment.