Fix error case where tray icon is already destroyed

This commit is contained in:
Yuya Ochiai 2017-10-20 22:08:47 +09:00
parent a9af3c2dcb
commit 02c63395b5

View file

@ -471,7 +471,7 @@ app.on('ready', () => {
} }
} }
if (trayIcon) { if (trayIcon && !trayIcon.isDestroyed()) {
if (arg.mentionCount > 0) { if (arg.mentionCount > 0) {
trayIcon.setImage(trayImages.mention); trayIcon.setImage(trayImages.mention);
if (process.platform === 'darwin') { if (process.platform === 'darwin') {