Skip to content

Commit

Permalink
prevent NullPointerException when trying to teleport
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeSkywalk3r committed Dec 9, 2019
1 parent 6e994fc commit ad340b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/com/minemaarten/signals/block/BlockTeleportRail.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ private Set<MCPos> getNeighboringTeleportRails(World world, BlockPos pos){
Set<MCPos> ret = new HashSet<MCPos>();
MCPos mcPos = new MCPos(world, pos);
RailEdge<MCPos> edge = RailNetworkManager.getServerInstance().getNetwork().findEdge(mcPos);
if (edge == null) return ret;
int startIndex = edge.getIndex(mcPos);
Object thisRailType = edge.get(startIndex).getRailType();

Expand Down

0 comments on commit ad340b0

Please sign in to comment.