🐛 catch windows going down

This commit is contained in:
Joao Moreno
2017-03-07 10:51:36 +01:00
parent 9d49773704
commit f8b3d1927d
2 changed files with 7 additions and 10 deletions

View File

@@ -42,7 +42,12 @@ export class SharedProcess {
this.disposables.push(toDisposable(() => {
// Electron seems to crash on Windows without this setTimeout :|
setTimeout(() => {
this.window.close();
try {
this.window.close();
} catch (err) {
// ignore, as electron is already shutting down
}
this.window = null;
}, 0);
}));