Skip to content

Commit

Permalink
fix destroyed object error in Util.send
Browse files Browse the repository at this point in the history
  • Loading branch information
ra3orblade committed Apr 19, 2024
1 parent 5b34eb3 commit a0afe0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion electron/js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class Util {
const args = [ ...arguments ];
const win = args[0];

if (win && win.webContents) {
if (win && !win.isDestroyed() && win.webContents) {
args.shift();
win.webContents.send.apply(win.webContents, args);
};
Expand Down

0 comments on commit a0afe0e

Please sign in to comment.