Project

General

Profile

Bug #2021

EditorLogic.SortedShipList throws NullReferenceException

Added by Airblader over 10 years ago. Updated over 7 years ago.

Status:
Closed
Severity:
Low
Assignee:
-
Category:
Gameplay
Target version:
-
Start date:
01/05/2014
% Done:

100%

Version:
Platform:
Any
Expansion:
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

EditorLogic.SortedShipList throws a NullReferenceException if no part has yet been added. For example, simply create a MonoBehaviour plugin with

void FixedUpdate() {
    List<Part> parts = EditorLogic.SortedShipList; // throws
}

Stacktrace:

at EditorLogic.recurseShipList (.Part part, System.Collections.Generic.List`1 shipList) [0x00000] in <filename unknown>:0
at EditorLogic.getSortedShipList () [0x00000] in <filename unknown>:0
at EditorLogic.get_SortedShipList () [0x00000] in <filename unknown>:0
at KerbalChecklist.KerbalChecklist.GetAttachedParts () [0x00000] in <filename unknown>:0

History

#1 Updated by TriggerAu almost 8 years ago

  • Status changed from New to Needs Clarification

#2 Updated by TriggerAu over 7 years ago

  • Status changed from Needs Clarification to Closed
  • % Done changed from 0 to 100

Closing this report out for now. If you find it is still occuring in the latest version of KSP please open a new report (and this one can be linked to it.) For best results, the wiki contains really useful info for when creating a report http://bugs.kerbalspaceprogram.com/projects/ksp/wiki.

You can also ask questions about the bug cleanup in the forum here: http://forum.kerbalspaceprogram.com/index.php?/topic/143980-time-to-clean-up-the-bug-tracker/ and tag @TriggerAu to get my attention

Also available in: Atom PDF