From 56cee5c9cf4d914452bfa346869aa472548a397b Mon Sep 17 00:00:00 2001 From: "J.T. Sage" Date: Fri, 17 May 2024 13:44:06 -0400 Subject: [PATCH] safely destroy splash screen, bump --- lib/modAssist_window_lib.js | 7 ++++++- package.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/modAssist_window_lib.js b/lib/modAssist_window_lib.js index 2ee29cbd..ebff68f9 100644 --- a/lib/modAssist_window_lib.js +++ b/lib/modAssist_window_lib.js @@ -845,7 +845,12 @@ module.exports.windowLib = class { this.win.splash.on('closed', () => { this.win.splash = null }) this.win.main.once('ready-to-show', () => { - setTimeout(() => { this.win.main.show(); this.win.splash.destroy() }, 2000) + setTimeout(() => { + this.win.main.show() + if ( this.isValid('splash') ) { + this.win.splash.destroy() + } + }, 2000) }) } diff --git a/package.json b/package.json index 2e97c22a..be6a16c4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fsg-mod-assistant", - "version": "4.0.3", + "version": "4.0.4", "description": "FSG Farm Sim Mod Assistant", "main": "modAssist_main.js", "homepage": "https://github.com/FSGModding/FSG_Mod_Assistant#readme",