ferram4 / Ferram-Aerospace-Research

Aerodynamics model for Kerbal Space Program
Other
239 stars 131 forks source link

Bail out of ResetEditorEvent if there is no root part. #79

Closed taniwha closed 9 years ago

taniwha commented 9 years ago

Various mods (in this case, KIS) will trigger editor events before EditorLogic.RootPart has been set. SortedShipList uses RootPart and thus will throw an NRE if used before RootPart has been set. Thus check RootPart instead of the number of parts in SortedShipList (logically the same effect).