https://github.com/linuxgurugamer/Through-The-Eyes/blob/22d43b2eaa8adcab01e604686e4b3e295f490389/ThroughTheEyes/EVABoundFix.cs#L10-L14
In the method EVABoundFix.Hook(KerbalEVA eva), there is no null check for the eva parameter, which can lead to a NullReferenceException when the following line is executed:
https://github.com/linuxgurugamer/Through-The-Eyes/blob/22d43b2eaa8adcab01e604686e4b3e295f490389/ThroughTheEyes/FirstPersonEVA.cs#L137
ThroughTheEyes.GetKerbalEVAFromVessel(pVessel) absolutely could be null:
https://github.com/linuxgurugamer/Through-The-Eyes/blob/22d43b2eaa8adcab01e604686e4b3e295f490389/ThroughTheEyes/ThroughTheEyes.cs#L19-L42
In addition to the null check issue, I’m also unclear on the purpose of the Hook() method. Currently, the method only instantiates a new EVABoundFix object and assigns it to a temporary variable temp, which is not used anywhere.
https://github.com/linuxgurugamer/Through-The-Eyes/blob/22d43b2eaa8adcab01e604686e4b3e295f490389/ThroughTheEyes/EVABoundFix.cs#L10-L14
In the method
EVABoundFix.Hook(KerbalEVA eva), there is no null check for the eva parameter, which can lead to a NullReferenceException when the following line is executed:https://github.com/linuxgurugamer/Through-The-Eyes/blob/22d43b2eaa8adcab01e604686e4b3e295f490389/ThroughTheEyes/FirstPersonEVA.cs#L137
ThroughTheEyes.GetKerbalEVAFromVessel(pVessel)absolutely could be null:https://github.com/linuxgurugamer/Through-The-Eyes/blob/22d43b2eaa8adcab01e604686e4b3e295f490389/ThroughTheEyes/ThroughTheEyes.cs#L19-L42
In addition to the null check issue, I’m also unclear on the purpose of the
Hook()method. Currently, the method only instantiates a new EVABoundFix object and assigns it to a temporary variable temp, which is not used anywhere.