From fb2ac76e283203d5bafbe2898710b342aaa475e6 Mon Sep 17 00:00:00 2001 From: Jonathan Bayer Date: Mon, 26 Dec 2022 11:27:13 -0500 Subject: [PATCH] Fixed nullref when entering game --- Changelog.txt | 3 +++ ClickThroughBlocker.version | 2 +- ClickThroughBlocker/AssemblyVersion.cs | 4 ++-- ClickThroughBlocker/OneTimePopup.cs | 2 +- .../ClickThroughBlocker.version | 2 +- GameData/000_ClickThroughBlocker/changelog.cfg | 11 +++++++++++ changelog.cfg | 10 ++++++++++ deploy.bat | 2 +- 8 files changed, 30 insertions(+), 6 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index a62179f..68b0585 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,5 +1,8 @@ ChangeLog +2.1.10.20 + Fixed nullref when entering game + 2.1.10.19 Fixed issue where changing the FocusFollowsClick in the settings wasn't being saved properly Fixed issue where changing the global setting in the settings wasn't being honored diff --git a/ClickThroughBlocker.version b/ClickThroughBlocker.version index d477648..e4557d4 100644 --- a/ClickThroughBlocker.version +++ b/ClickThroughBlocker.version @@ -10,7 +10,7 @@ "MAJOR": 2, "MINOR": 1, "PATCH": 10, - "BUILD": 19 + "BUILD": 20 }, "KSP_VERSION_MIN": { "MAJOR": 1, diff --git a/ClickThroughBlocker/AssemblyVersion.cs b/ClickThroughBlocker/AssemblyVersion.cs index 6c25a6d..e992367 100644 --- a/ClickThroughBlocker/AssemblyVersion.cs +++ b/ClickThroughBlocker/AssemblyVersion.cs @@ -5,6 +5,6 @@ using System.Reflection; - [assembly: AssemblyVersion("2.1.10.18")] - [assembly: AssemblyFileVersion("2.1.10.18")] + [assembly: AssemblyVersion("2.1.10.19")] + [assembly: AssemblyFileVersion("2.1.10.19")] [assembly: KSPAssembly("ClickThroughBlocker", 2, 1, 0)] \ No newline at end of file diff --git a/ClickThroughBlocker/OneTimePopup.cs b/ClickThroughBlocker/OneTimePopup.cs index 839e052..55f5afe 100644 --- a/ClickThroughBlocker/OneTimePopup.cs +++ b/ClickThroughBlocker/OneTimePopup.cs @@ -151,7 +151,7 @@ static internal bool GetGlobalDefault(ref bool b) { if (System.IO.File.Exists(GlobalDefaultFile)) { - if (HighLogic.CurrentGame.Parameters.CustomParams().global) + if (HighLogic.CurrentGame == null || HighLogic.CurrentGame.Parameters.CustomParams().global) { ConfigNode node = ConfigNode.Load(GlobalDefaultFile); if (node.TryGetValue("focusFollowsClick", ref b)) diff --git a/GameData/000_ClickThroughBlocker/ClickThroughBlocker.version b/GameData/000_ClickThroughBlocker/ClickThroughBlocker.version index c905c35..d477648 100644 --- a/GameData/000_ClickThroughBlocker/ClickThroughBlocker.version +++ b/GameData/000_ClickThroughBlocker/ClickThroughBlocker.version @@ -10,7 +10,7 @@ "MAJOR": 2, "MINOR": 1, "PATCH": 10, - "BUILD": 18 + "BUILD": 19 }, "KSP_VERSION_MIN": { "MAJOR": 1, diff --git a/GameData/000_ClickThroughBlocker/changelog.cfg b/GameData/000_ClickThroughBlocker/changelog.cfg index 57f8a34..bf184e9 100644 --- a/GameData/000_ClickThroughBlocker/changelog.cfg +++ b/GameData/000_ClickThroughBlocker/changelog.cfg @@ -7,6 +7,17 @@ KERBALCHANGELOG + VERSION + { + version = 2.1.10.19 + CHANGE + { + change = Fixed issue where changing the FocusFollowsClick in the settings wasn't being saved properly + change = Fixed issue where changing the global setting in the settings wasn't being honored + + type = update + } + } VERSION { version = 2.1.10.18 diff --git a/changelog.cfg b/changelog.cfg index bf184e9..bfcfc2b 100644 --- a/changelog.cfg +++ b/changelog.cfg @@ -5,6 +5,16 @@ KERBALCHANGELOG license = Lesser GPLv3 author = Linuxgurugamer + VERSION + { + version = 2.1.10.20 + CHANGE + { + change = Fixed nullref when entering game + + type = update + } + } VERSION diff --git a/deploy.bat b/deploy.bat index 567ccb1..75d3f90 100644 --- a/deploy.bat +++ b/deploy.bat @@ -9,7 +9,7 @@ rem but not always set H=%KSPDIR% -set H=R:\KSP_1.12.4 +rem set H=R:\KSP_1.12.4 set GAMEDIR=000_ClickThroughBlocker set GAMEDATA=GameData