Skip to content

Commit

Permalink
Fix potential exception
Browse files Browse the repository at this point in the history
  • Loading branch information
FALSkills committed Sep 27, 2024
1 parent 4952f3e commit 8c81a40
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/dax/walker_engine/navigation_utils/Charter.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,13 @@ private static HashMap<LocationProperty, Location> getCharterLocations(){
&& !rsInterface.isHidden())

.collect(Collectors.toList())
.forEach(rsInterface -> locations.put(
LocationProperty.stringToLocation(rsInterface.getActions()[0]), new Location(rsInterface)));
.forEach(rsInterface -> {
String[] actions = rsInterface.getActions();
if(actions == null || actions.length == 0)
return;
locations.put(
LocationProperty.stringToLocation(actions[0]), new Location(rsInterface))
});
return locations;
}

Expand Down

0 comments on commit 8c81a40

Please sign in to comment.