App will crash in below scenario, because all windows are closed,
so add protected code.
App is quitting -> ready-to-show event is triggered
-> visibility_callback -> GetMainNativeWindow
Change-Id: Ie71dc4ff71bf639a7059641a34b4819a7e97869a
Signed-off-by: zhaosy <shiyusy.zhao@samsung.com>
private setupMainWindowEventListener() {
this.mainWindow.once('ready-to-show', () => {
+ if (this.inQuit)
+ return;
+
console.log('mainWindow ready-to-show');
if (this.showTimer)
clearTimeout(this.showTimer);