From 02c63395b59518ed30521fdcf44b27bdac99075f Mon Sep 17 00:00:00 2001 From: Yuya Ochiai Date: Fri, 20 Oct 2017 22:08:47 +0900 Subject: [PATCH] Fix error case where tray icon is already destroyed --- src/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 357d9c2b..cff5aa9f 100644 --- a/src/main.js +++ b/src/main.js @@ -471,7 +471,7 @@ app.on('ready', () => { } } - if (trayIcon) { + if (trayIcon && !trayIcon.isDestroyed()) { if (arg.mentionCount > 0) { trayIcon.setImage(trayImages.mention); if (process.platform === 'darwin') {