mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-22 08:57:00 -06:00
fix crash on exit (#31)
This commit is contained in:
parent
38f92b8849
commit
766933ebf1
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user