Skip to content

Commit 81c8973

Browse files
authored
Merge pull request #1228 from shadiradio/dev-1.5.4
FIX for startup events race condition on mac
2 parents 92e7ca7 + b9450cb commit 81c8973

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/electron.main/ElectronMain.hx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ class ElectronMain {
2727
showSplashWindow();
2828
});
2929
App.on('did-become-active', function() {
30-
mainWindow.show();
31-
mainWindow.maximize();
30+
if( mainWindow != null && !mainWindow.isDestroyed() ) {
31+
mainWindow.show();
32+
mainWindow.maximize();
33+
}
3234
});
3335

3436
initIpcBindings();

0 commit comments

Comments
 (0)