Skip to content

Commit

Permalink
To prevent crashes, catch thrown error from tray.setIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnonnenberg-signal authored and kenpowers-signal committed Jun 10, 2019
1 parent 9fd867f commit ca1e6c3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/tray_icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@ function createTrayIcon(getMainWindow, messages) {
console.log('tray.updateIcon: Image for tray update does not exist!');
return;
}
tray.setImage(image);
try {
tray.setImage(image);
} catch (error) {
console.log(
'tray.setImage error:',
error && error.stack ? error.stack : error
);
}
};

tray.on('click', tray.showWindow);
Expand Down

0 comments on commit ca1e6c3

Please sign in to comment.