From d5fd8b39e78f2f56cea7111339c6094855ea6058 Mon Sep 17 00:00:00 2001 From: Andrew Gundersen Date: Tue, 23 Nov 2021 13:39:40 -0600 Subject: [PATCH] window null bug fix --- src/window.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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")); -- 2.43.0