fix: reopening window crash on macos

This commit is contained in:
Amadou Ada DIENE
2020-04-30 10:21:02 +02:00
parent 4a0397f56e
commit f442df72c4

View File

@@ -72,8 +72,11 @@ export class Window {
this.openDevTools(); this.openDevTools();
} }
// Delete current reference when the window is closed` // When the window is closed`
this._window.on('closed', () => { this._window.on('closed', () => {
// Remove IPC Main listeners
ipcMain.removeAllListeners();
// Delete current reference
delete this._window; delete this._window;
}); });
} }