Fixed NPE crash when an LHC has no injector

This commit is contained in:
LemADEC 2017-11-01 15:49:33 +01:00
parent 8380d9873c
commit c895d9aeb0

View file

@ -547,7 +547,7 @@ public class AcceleratorSetup extends GlobalPosition {
// Pseudo-API for computers
public Object[][] getControlPoints(final IBlockAccess blockAccess) {
final Object[][] objectResults = new Object[controlPoints.size() + keyInjectors.length][];
final Object[][] objectResults = new Object[controlPoints.size() + (keyInjectors == null ? 0 : keyInjectors.length)][];
int index = 0;
for (final Entry<VectorI, Integer> entryControlPoint : controlPoints.entrySet()) {
final Integer tier = TrajectoryPoint.getTier(entryControlPoint.getValue());