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:
parent
38f92b8849
commit
766933ebf1
@ -96,7 +96,7 @@ function createMainWindow(url) {
|
|||||||
removeWindowKey(key);
|
removeWindowKey(key);
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
mainWindow.removeAllListeners();
|
mainWindow.removeAllListeners();
|
||||||
if (mainWindow.webContents) {
|
if (!mainWindow.isDestroyed() && mainWindow.webContents) {
|
||||||
mainWindow.webContents.removeAllListeners();
|
mainWindow.webContents.removeAllListeners();
|
||||||
}
|
}
|
||||||
mainWindow = null;
|
mainWindow = null;
|
||||||
@ -159,7 +159,7 @@ function createChildWindow(url, title, width, height) {
|
|||||||
removeWindowKey(winKey);
|
removeWindowKey(winKey);
|
||||||
if (childWindow) {
|
if (childWindow) {
|
||||||
childWindow.removeAllListeners();
|
childWindow.removeAllListeners();
|
||||||
if (childWindow.webContents) {
|
if (!childWindow.isDestroyed() && childWindow.webContents) {
|
||||||
childWindow.webContents.removeAllListeners();
|
childWindow.webContents.removeAllListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user