diff --git a/src/main/main.ts b/src/main/main.ts index f3378475..2f1fefa5 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -40,6 +40,10 @@ export default class AppUpdater { } } +process.on('uncaughtException', (error: any) => { + console.log('Error in main process', error); +}); + if (store.get('ignore_ssl')) { app.commandLine.appendSwitch('ignore-certificate-errors'); } @@ -393,7 +397,7 @@ ipcMain.on('player-set-properties', async (_event, data: Record) => ipcMain.on( 'player-restart', async (_event, data: { extraParameters?: string[]; properties?: Record }) => { - getMpvInstance()?.quit(); + mpvInstance?.quit(); createMpv(data); }, );