mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 22:44:07 +01:00
fix: signal group NPE
This commit is contained in:
parent
2cf7d171df
commit
fbc62d4ba2
@ -107,6 +107,8 @@ public class EdgeData {
|
|||||||
if (!hasSignalBoundaries())
|
if (!hasSignalBoundaries())
|
||||||
return getEffectiveEdgeGroupId(graph);
|
return getEffectiveEdgeGroupId(graph);
|
||||||
SignalBoundary firstSignal = next(EdgePointType.SIGNAL, 0);
|
SignalBoundary firstSignal = next(EdgePointType.SIGNAL, 0);
|
||||||
|
if (firstSignal == null)
|
||||||
|
return null;
|
||||||
UUID currentGroup = firstSignal.getGroup(edge.node1);
|
UUID currentGroup = firstSignal.getGroup(edge.node1);
|
||||||
|
|
||||||
for (TrackEdgePoint trackEdgePoint : getPoints()) {
|
for (TrackEdgePoint trackEdgePoint : getPoints()) {
|
||||||
|
@ -505,7 +505,7 @@ public class TrackGraph {
|
|||||||
|
|
||||||
SignalEdgeGroup group = Create.RAILWAYS.signalEdgeGroups.get(groupId);
|
SignalEdgeGroup group = Create.RAILWAYS.signalEdgeGroups.get(groupId);
|
||||||
SignalEdgeGroup otherGroup = Create.RAILWAYS.signalEdgeGroups.get(otherGroupId);
|
SignalEdgeGroup otherGroup = Create.RAILWAYS.signalEdgeGroups.get(otherGroupId);
|
||||||
if (group == null || otherGroup == null)
|
if (group == null || otherGroup == null || groupId == null || otherGroupId == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
intersection.groupId = groupId;
|
intersection.groupId = groupId;
|
||||||
|
Loading…
Reference in New Issue
Block a user