Skip to content

Commit

Permalink
Merge pull request #209 from MrTroble/fix/1.16.5
Browse files Browse the repository at this point in the history
fix: NPEs in SignalBoxPathway
  • Loading branch information
Uhutown authored Aug 5, 2023
2 parents dffa0de + 8808953 commit 824eb51
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
if: endswith(github.ref_name, 'master') && github.ref_protected && github.ref_type == 'branch'
runs-on: ubuntu-latest
env:
APPVEYOR_BUILD_VERSION: '3.0.0'
APPVEYOR_BUILD_VERSION: '3.0.1'
CURSETOKEN: ${{ secrets.CURSETOKEN }}
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [1.16.5 - 3.0.1]

fix: ServerStartup issue

## [1.16.5 - 3.0.0]

* feat: added multilinking tool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public SignalBoxPathway(final Map<Point, SignalBoxNode> modeGrid,
if (this.type.equals(PathType.NONE))
throw new IllegalArgumentException();
initalize();
updatePathwayToAutomatic();
this.originalFirstPoint = new Point(firstPoint);
updatePathwayToAutomatic();
}

private void initalize() {
Expand Down Expand Up @@ -360,7 +360,11 @@ public void deactivateAllOutputsOnPathway() {
}

public void updatePathwayToAutomatic() {
final SignalBoxNode first = modeGrid.get(firstPoint);
final SignalBoxNode first = modeGrid.get(originalFirstPoint);
if (first == null) {
isAutoPathway = false;
return;
}
this.isAutoPathway = first.isAutoPoint();
}

Expand Down Expand Up @@ -424,4 +428,4 @@ public ImmutableList<SignalBoxNode> getListOfNodes() {
public boolean isEmptyOrBroken() {
return emptyOrBroken;
}
}
}

0 comments on commit 824eb51

Please sign in to comment.