mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
fix crash on exit (#31)
This commit is contained in:
@@ -96,7 +96,7 @@ function createMainWindow(url) {
|
||||
removeWindowKey(key);
|
||||
if (mainWindow) {
|
||||
mainWindow.removeAllListeners();
|
||||
if (mainWindow.webContents) {
|
||||
if (!mainWindow.isDestroyed() && mainWindow.webContents) {
|
||||
mainWindow.webContents.removeAllListeners();
|
||||
}
|
||||
mainWindow = null;
|
||||
@@ -159,7 +159,7 @@ function createChildWindow(url, title, width, height) {
|
||||
removeWindowKey(winKey);
|
||||
if (childWindow) {
|
||||
childWindow.removeAllListeners();
|
||||
if (childWindow.webContents) {
|
||||
if (!childWindow.isDestroyed() && childWindow.webContents) {
|
||||
childWindow.webContents.removeAllListeners();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user