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
parent
commit
04ffdb196b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      app/lib/zap/controller.js
  2. 4
      app/main.dev.js

6
app/lib/zap/controller.js

@ -112,6 +112,12 @@ class ZapController {
this.mainWindow.hide() 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
})
} }
// ------------------------------------ // ------------------------------------

4
app/main.dev.js

@ -109,7 +109,9 @@ app.on('ready', () => {
event.preventDefault() event.preventDefault()
zap.terminate() zap.terminate()
} else { } else {
zap.mainWindow.forceClose = true if (zap.mainWindow) {
zap.mainWindow.forceClose = true
}
} }
}) })

Loading…
Cancel
Save