diff --git a/src/main/index.ts b/src/main/index.ts index 5306485..3dcef62 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -116,7 +116,9 @@ async function bootstrap(): Promise { } app.on('second-instance', () => { - showAndFocusWindow(); + if (mainWindow && !mainWindow.isDestroyed()) { + showAndFocusWindow(mainWindow); + } }); app.whenReady().then(bootstrap);