Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop: Fixes #8591 - Error while quitting the app #8612

Merged
merged 1 commit into from Aug 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/app-desktop/ElectronAppWrapper.ts
Expand Up @@ -174,7 +174,7 @@ export default class ElectronAppWrapper {
// so that it can tell us if we can really close the app or not.
// Search for "appClose" event for closing logic on renderer side.
event.preventDefault();
this.win_.webContents.send('appClose');
if (this.win_) this.win_.webContents.send('appClose');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code inside if (isGoingToExit) is running 3 times after closing the app and at the thirty time this.win_ is null. So, I think in some cases it's entering the next if statement if (!this.rendererProcessQuitReply_) and causing the problem. I hope it makes sense.

} else {
// If the renderer process has responded, check if we can close or not
if (this.rendererProcessQuitReply_.canClose) {
Expand Down