[MM-47779] Prevent crash when either URL view or main window was destroyed first (#2300)

This commit is contained in:
Devin Binnie
2022-10-21 09:19:33 -04:00
committed by GitHub
parent f7f38102d8
commit dc49003d38

View File

@@ -373,7 +373,11 @@ export class ViewManager {
const hideView = () => {
delete this.urlViewCancel;
this.mainWindow.removeBrowserView(urlView);
try {
this.mainWindow.removeBrowserView(urlView);
} catch (e) {
log.error('Failed to remove URL view', e);
}
// workaround to eliminate zombie processes
// https://github.com/mattermost/desktop/pull/1519