Skip to content

Commit

Permalink
fix: ArrayIndexOutOfBounds
Browse files Browse the repository at this point in the history
  • Loading branch information
Uhutown committed Oct 23, 2023
1 parent c6a6c3e commit 84208d0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ private void setupModeSettings(final UIEntity parent, final EnumGuiMode mode,
return point.toShortString();
}));
parent.add(GuiElements.createEnumElement(integerable, e -> {
final Point point = validInConnections.get(e);
final Point point = e >= 0 ? validInConnections.get(e) : null;
if (point == null) {
option.removeEntry(PathEntryType.POINT);
removeEntryFromServer(node, mode, rotation, PathEntryType.POINT);
Expand All @@ -467,7 +467,7 @@ private void setupModeSettings(final UIEntity parent, final EnumGuiMode mode,
return point.toShortString();
}));
parent.add(GuiElements.createEnumElement(integerable, e -> {
final Point point = validEnds.get(e);
final Point point = e >= 0 ? validEnds.get(e) : null;
if (point == null) {
option.removeEntry(PathEntryType.POINT);
removeEntryFromServer(node, mode, rotation, PathEntryType.POINT);
Expand Down

0 comments on commit 84208d0

Please sign in to comment.