Browse Source
Merge pull request #806 from mrfelton/fix/linux-close
fix(wallet): dereference window after closing
renovate/lint-staged-8.x
JimmyMow
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
9 additions and
1 deletions
-
app/lib/zap/controller.js
-
app/main.dev.js
|
|
@ -112,6 +112,12 @@ class ZapController { |
|
|
|
this.mainWindow.hide() |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
// Dereference the window object, usually you would store windows in an array if your app supports multi windows,
|
|
|
|
// this is the time when you should delete the corresponding element.
|
|
|
|
this.mainWindow.on('closed', () => { |
|
|
|
this.mainWindow = null |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// ------------------------------------
|
|
|
|
|
|
@ -109,7 +109,9 @@ app.on('ready', () => { |
|
|
|
event.preventDefault() |
|
|
|
zap.terminate() |
|
|
|
} else { |
|
|
|
zap.mainWindow.forceClose = true |
|
|
|
if (zap.mainWindow) { |
|
|
|
zap.mainWindow.forceClose = true |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|