From: Andrew Gundersen Date: Tue, 23 Nov 2021 19:39:40 +0000 (-0600) Subject: window null bug fix X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=d5fd8b39e78f2f56cea7111339c6094855ea6058;p=mime-chat window null bug fix --- diff --git a/src/window.js b/src/window.js index 0f9887d..4c625ee 100644 --- a/src/window.js +++ b/src/window.js @@ -65,7 +65,10 @@ function createWin() backgroundMitt.removeAllListeners("ipc-renderer"); backgroundMitt.on("ipc-renderer", (channel, ...args) => { - win.webContents.send(channel, ...args); + if (win) + { + win.webContents.send(channel, ...args); + } }); win.webContents.send("set-account", store.get("account"));