Skip to content

Commit

Permalink
solve problem of exceptions on quit. fix deltachat#2201
Browse files Browse the repository at this point in the history
  • Loading branch information
farooqkz committed Aug 4, 2023
1 parent e8778ee commit 2ce4b13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- fix: Center the "no media" text in Gallery
- fix: The media fullscreen screen is now always closed using Esc key(#2919)
- fix: Fix problem of crashing Delta Chat when it can't write to standard output (#3323)
- fix: Fix problem of returning exception on quit (#2201)

<a id="1_38_1"></a>

Expand Down
4 changes: 4 additions & 0 deletions src/main/windows/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ export function send(channel: string, ...args: any[]) {
log.warn("window not defined, can't send ipc to renderer")
return
}
if (window.webContents.isDestroyed()) {
log.warn('window.webContents is destroyed. not sending message')
return
}
try {
window.webContents.send(channel, ...args)
} catch (error) {
Expand Down

0 comments on commit 2ce4b13

Please sign in to comment.