Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion electron/fragments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,15 @@ async function captureStart(
id, w: size.width, h: size.height, data: image.getBitmap()
})
})
await win.loadURL(url)
try {
await win.loadURL(url)
} catch (err) {
// a failed load must not leave a live, continuously-painting window behind:
// captures.has(id) short-circuits every future start for this id, so an
// orphan here is unrecoverable without restarting the app
captureStop(id)
throw err
}
}

function captureStop(id: string) {
Expand Down