[MM-47779] Prevent crash when either URL view or main window was destroyed first (#2300)
This commit is contained in:
@@ -373,7 +373,11 @@ export class ViewManager {
|
|||||||
|
|
||||||
const hideView = () => {
|
const hideView = () => {
|
||||||
delete this.urlViewCancel;
|
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
|
// workaround to eliminate zombie processes
|
||||||
// https://github.com/mattermost/desktop/pull/1519
|
// https://github.com/mattermost/desktop/pull/1519
|
||||||
|
Reference in New Issue
Block a user