Fix segfault when running app bundle

This commit is contained in:
Samuel Elliott 2022-06-30 18:36:00 +01:00
parent 4c6353c523
commit 8d38b94dcd
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6

View File

@ -12,16 +12,17 @@ import { EmbeddedPresenceMonitor, EmbeddedProxyPresenceMonitor } from './monitor
const debug = createDebug('app:main:menu');
const icon = nativeImage
.createFromPath(path.join(dir, 'resources', 'app', 'menu-icon.png'))
.resize({height: 16});
icon.setTemplateImage(true);
export default class MenuApp {
tray = new Tray(icon);
tray: Tray;
constructor(readonly app: App) {
const icon = nativeImage
.createFromPath(path.join(dir, 'resources', 'app', 'menu-icon.png'))
.resize({height: 16});
icon.setTemplateImage(true);
this.tray = new Tray(icon);
this.tray.setToolTip('nxapi');
app.store.on('update-nintendo-accounts', () => this.updateMenu());