post-kerbin-mining-corporation / SpaceDust

Adds atmospheric and exoatmospheric resource discovery and extraction to Kerbal Space Program.
9 stars 12 forks source link

minor NRE when ModuleSpaceDustTelescope defines specific instruments #59

Open Rodg88 opened 1 month ago

Rodg88 commented 1 month ago

Adding ModuleSpaceDustTelescope to a part using the following patches with specified instruments causes some NREs in the log:

https://github.com/CobaltWolf/Bluedog-Design-Bureau/blob/1.14-Development/Gamedata/Bluedog_DB/Compatibility/SpaceDust/SpaceDust.cfg

[ERR 01:35:03.264] Module ModuleSpaceDustTelescope threw during OnLoad: System.NullReferenceException: Object reference not set to an instance of an object
  at SpaceDust.InstrumentSlot..ctor (ConfigNode node) [0x0004d] in <c47f653846a142b9b219760948a6f211>:0 
  at SpaceDust.ModuleSpaceDustTelescope.OnLoad (ConfigNode node) [0x00034] in <c47f653846a142b9b219760948a6f211>:0 
  at PartModule.Load (ConfigNode node) [0x001ab] in <4b449f2841f84227adfaad3149c8fdba>:0 

Replacing the Instrument in each slot with None instead of the SPACEDUST_INSTRUMENT name prevents the error, so it's just an issue with a fixed instrument setup.

KSP_SD.zip (using 0.5.3, the log doesn't seem to say the version)