fix: signal group NPE

This commit is contained in:
IThundxr 2023-11-30 09:22:58 -05:00
parent 2cf7d171df
commit fbc62d4ba2
No known key found for this signature in database
GPG Key ID: E291EC97BAF935E6
2 changed files with 3 additions and 1 deletions

View File

@ -107,6 +107,8 @@ public class EdgeData {
if (!hasSignalBoundaries())
return getEffectiveEdgeGroupId(graph);
SignalBoundary firstSignal = next(EdgePointType.SIGNAL, 0);
if (firstSignal == null)
return null;
UUID currentGroup = firstSignal.getGroup(edge.node1);
for (TrackEdgePoint trackEdgePoint : getPoints()) {

View File

@ -505,7 +505,7 @@ public class TrackGraph {
SignalEdgeGroup group = Create.RAILWAYS.signalEdgeGroups.get(groupId);
SignalEdgeGroup otherGroup = Create.RAILWAYS.signalEdgeGroups.get(otherGroupId);
if (group == null || otherGroup == null)
if (group == null || otherGroup == null || groupId == null || otherGroupId == null)
continue;
intersection.groupId = groupId;