To prevent crashes, catch thrown error from tray.setIcon
This commit is contained in:
parent
9fd867fdd1
commit
ca1e6c3ccd
1 changed files with 8 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue