Skip to content

Commit

Permalink
fix potential crash on shutdown (#4244)
Browse files Browse the repository at this point in the history
  • Loading branch information
holiber authored Mar 22, 2024
1 parent be5dd9c commit 3377d7b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,11 @@ async function startApp() {
// we will refactor this to not use electron IPC, which will make it much
// more efficient.
ipcMain.on('getWorkerWindowId', event => {
if (workerWindow.isDestroyed()) {
// prevent potential race-condition issues on app close
// https://github.com/stream-labs/desktop/pull/4239
return;
}
event.returnValue = workerWindow.webContents.id;
});

Expand Down

0 comments on commit 3377d7b

Please sign in to comment.