Skip to content

Commit 4f332fc

Browse files
Fix nullrefs upong returning to mainmenu by adding check for no game loaded (ie: returning to main menu) in CBTMonitor.Update & CBTMonitor.LateUpdate
1 parent 1daf4b0 commit 4f332fc

File tree

7 files changed

+36
-7
lines changed

7 files changed

+36
-7
lines changed

Changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
ChangeLog
22

3+
0.1.10.10
4+
Fix nullrefs upong returning to mainmenu by adding check for no game loaded (ie: returning to main menu) in CBTMonitor.Update & CBTMonitor.LateUpdate
5+
36
0.1.10.9
47
Fixed Popupshown.cfg from having endless repeats of the popupshown = true appended
58
Fixed error which caused buildings to be non-clickable if clicking on a control in the window closed it (such as an X or a Close button)
69
Made all members of Log class to be internal, to avoid conflicts with KSP_Log
10+
Modified the CBTMonitor to run in all scenes, needed for FocusToClick to work properly
711

812
0.1.10.6
913
Added missing files

ClickThroughBlocker.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"MAJOR": 0,
1111
"MINOR": 1,
1212
"PATCH": 10,
13-
"BUILD": 9
13+
"BUILD": 10
1414
},
1515
"KSP_VERSION_MIN": {
1616
"MAJOR": 1,

ClickThroughBlocker/AssemblyVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
using System.Reflection;
77

8-
[assembly: AssemblyVersion("0.1.10.9")]
8+
[assembly: AssemblyVersion("0.1.10.10")]

ClickThroughBlocker/CBTMonitor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void onGameSceneLoadRequested(GameScenes gs)
2525
// the mouse moved over a protected window
2626
void Update()
2727
{
28-
if (HighLogic.CurrentGame.Parameters.CustomParams<CTB>().focusFollowsclick)
28+
if (HighLogic.CurrentGame == null || HighLogic.CurrentGame.Parameters.CustomParams<CTB>().focusFollowsclick)
2929
return;
3030
{
3131
if (ClickThruBlocker.CTBWin.activeBlockerCnt > 0)
@@ -66,7 +66,7 @@ void Update()
6666
int d;
6767
void LateUpdate()
6868
{
69-
if (HighLogic.CurrentGame.Parameters.CustomParams<CTB>().focusFollowsclick)
69+
if (HighLogic.CurrentGame == null || HighLogic.CurrentGame.Parameters.CustomParams<CTB>().focusFollowsclick)
7070
return;
7171

7272
d = 0;

GameData/000_ClickThroughBlocker/ClickThroughBlocker.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"MAJOR": 0,
1111
"MINOR": 1,
1212
"PATCH": 10,
13-
"BUILD": 9
13+
"BUILD": 10
1414
},
1515
"KSP_VERSION_MIN": {
1616
"MAJOR": 1,

GameData/000_ClickThroughBlocker/changelog.cfg

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,28 @@ KERBALCHANGELOG
77

88
VERSION
99
{
10-
version = 0.1.10.8
10+
version = 0.1.10.10
1111
CHANGE
1212
{
13-
change = Fixed buildings being non-clickable after selecting FocusFollowsMouse
13+
change = Fix nullrefs upong returning to mainmenu by adding check for no game loaded (ie: returning to main menu) in CBTMonitor.Update & CBTMonitor.LateUpdate
1414
type = update
1515
}
1616
}
1717

18+
VERSION
19+
{
20+
version = 0.1.10.9
21+
CHANGE
22+
{
23+
change = Fixed lock issues
24+
type = update
25+
subchange = Fixed Popupshown.cfg from having endless repeats of the popupshown = true appended
26+
subchange = Fixed error which caused buildings to be non-clickable if clicking on a control in the window closed it (such as an X or a Close button)
27+
subchange = Made all members of Log class to be internal, to avoid conflicts with KSP_Log
28+
subchange = Modified the CBTMonitor to run in all scenes, needed for FocusToClick to work properly
29+
}
30+
}
31+
1832
VERSION
1933
{
2034
version = 1.0.10.7

changelog.cfg

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ KERBALCHANGELOG
55
license = Lesser GPLv3
66
author = Linuxgurugamer
77

8+
VERSION
9+
{
10+
version = 0.1.10.10
11+
CHANGE
12+
{
13+
change = Fix nullrefs upong returning to mainmenu by adding check for no game loaded (ie: returning to main menu) in CBTMonitor.Update & CBTMonitor.LateUpdate
14+
type = update
15+
}
16+
}
17+
818
VERSION
919
{
1020
version = 0.1.10.9
@@ -15,6 +25,7 @@ KERBALCHANGELOG
1525
subchange = Fixed Popupshown.cfg from having endless repeats of the popupshown = true appended
1626
subchange = Fixed error which caused buildings to be non-clickable if clicking on a control in the window closed it (such as an X or a Close button)
1727
subchange = Made all members of Log class to be internal, to avoid conflicts with KSP_Log
28+
subchange = Modified the CBTMonitor to run in all scenes, needed for FocusToClick to work properly
1829
}
1930
}
2031

0 commit comments

Comments
 (0)