electron-trpc icon indicating copy to clipboard operation
electron-trpc copied to clipboard

Fix crash when calling .destroy() on a BrowserWindow

Open dguenther opened this issue 8 months ago • 1 comments

Fixes a crash that happens when calling .destroy() on a BrowserWindow with an electron-trpc handler attached. detachHandler can potentially be called with a destroyed window, which then causes a crash on accessing win.webContents.id. See #156 for a reproduction case.

Definitely open to alternate solutions here! Feel free to close this PR or push to the branch directly if you'd like any changes.

Closes #156

dguenther avatar May 28 '24 21:05 dguenther