Skip to content

Commit 5a60584

Browse files
Thanks to forum user @ozraven for this:
Fixed a null ref which occurred when clicking in a debug window
1 parent 86eebcd commit 5a60584

File tree

8 files changed

+23
-14
lines changed

8 files changed

+23
-14
lines changed

ChangeLog.txt

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

3+
3.4.3.6
4+
Thanks to forum user @ozraven for this:
5+
Fixed a null ref which occurred when clicking in a debug window
6+
37
3.4.3.5
48
Added AssemblyFileVersion
59
Updated version file for 1.12

EditorExtensionsRedux.version

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
"MAJOR": 3,
77
"MINOR": 4,
88
"PATCH": 3,
9-
"BUILD": 5
9+
"BUILD": 6
1010
},
1111
"KSP_VERSION": {
1212
"MAJOR": 1,
1313
"MINOR": 12,
14-
"PATCH": 0
14+
"PATCH": 5
1515
},
1616
"KSP_VERSION_MIN": {
1717
"MAJOR": 1,

EditorExtensionsRedux/AssemblyVersion.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010

1111
using System.Reflection;
1212

13-
[assembly: AssemblyVersion("3.4.3.4")]
14-
[assembly: AssemblyFileVersion("3.4.3.4")]
13+
[assembly: AssemblyVersion("3.4.3.6")]
14+
[assembly: AssemblyFileVersion("3.4.3.6")]

EditorExtensionsRedux/EditorExtensionsRedux.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@ public class Config
14791479
//var gizmosRotate = HighLogic.FindObjectsOfType<EditorGizmos.GizmoRotate> ();
14801480
// if (gizmoRotateHandle == null)
14811481
// gizmoRotateHandle = HighLogic.FindObjectOfType<EditorGizmos.GizmoRotateHandle> ();
1482-
float rotation = FineAdjustWindow.Instance.rotation;
1482+
float rotation = FineAdjustWindow.Instance.rotationZZ;
14831483

14841484
if (Input.GetKey(cfg.KeyMap.Down))
14851485
{

EditorExtensionsRedux/FineAdjustWindow.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ enum AdjustmentType
8282
AdjustmentType adjType = AdjustmentType.translation;
8383
string adjTypeStr = "Translation";
8484
public float offset = 0.01f;
85-
public float rotation = 1.0f;
85+
public float rotationZZ = 1.0f;
8686
public int offsetDeltaIndex = 2;
8787
public int rotationdeltaIndex = 0;
8888

@@ -205,9 +205,9 @@ void WindowContent (int windowID)
205205
if (GUILayout.Button ("-", GUILayout.Width (20))) {
206206
switch (adjType) {
207207
case AdjustmentType.rotation:
208-
rotation -= getDelta (rotationdeltaIndex);
209-
if (rotation <= 0.0f)
210-
rotation = getDelta (rotationdeltaIndex);
208+
rotationZZ -= getDelta (rotationdeltaIndex);
209+
if (rotationZZ <= 0.0f)
210+
rotationZZ = getDelta (rotationdeltaIndex);
211211

212212
break;
213213
case AdjustmentType.translation:
@@ -220,7 +220,7 @@ void WindowContent (int windowID)
220220
}
221221
switch (adjType) {
222222
case AdjustmentType.rotation:
223-
GUILayout.Label (rotation.ToString (), "TextField");
223+
GUILayout.Label (rotationZZ.ToString (), "TextField");
224224
break;
225225
case AdjustmentType.translation:
226226
GUILayout.Label (offset.ToString (), "TextField");
@@ -230,7 +230,7 @@ void WindowContent (int windowID)
230230
if (GUILayout.Button ("+", GUILayout.Width (20))) {
231231
switch (adjType) {
232232
case AdjustmentType.rotation:
233-
rotation += getDelta (rotationdeltaIndex);
233+
rotationZZ += getDelta (rotationdeltaIndex);
234234
break;
235235
case AdjustmentType.translation:
236236
offset += getDelta (offsetDeltaIndex);

EditorExtensionsRedux/StockSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public override bool Enabled(MemberInfo member, GameParameters parameters)
3737
return true;
3838
}
3939

40-
bool unread = false;
40+
//bool unread = false;
4141
public override bool Interactible(MemberInfo member, GameParameters parameters)
4242
{
4343

EditorExtensionsRedux/Utility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static Part GetPartUnderCursor()
1414
EditorLogic ed = EditorLogic.fetch;
1515
if (ed != null && Physics.Raycast(ray, out hit))
1616
{
17-
return ed.ship.Parts.Find(p => p.gameObject == hit.transform.gameObject);
17+
return ed.ship.Parts.Find(p => p != null && p.gameObject == hit.transform.gameObject);
1818
}
1919
return null;
2020
}

GameData/EditorExtensionsRedux/EditorExtensionsRedux.version

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
"MAJOR": 3,
77
"MINOR": 4,
88
"PATCH": 3,
9-
"BUILD": 4
9+
"BUILD": 6
10+
},
11+
"KSP_VERSION": {
12+
"MAJOR": 1,
13+
"MINOR": 12,
14+
"PATCH": 5
1015
},
1116
"KSP_VERSION_MIN": {
1217
"MAJOR": 1,

0 commit comments

Comments
 (0)