From 8c81a408c12730c56e5dd092c0ec2756e637dc6f Mon Sep 17 00:00:00 2001 From: FALSkills Date: Thu, 26 Sep 2024 20:04:34 -0500 Subject: [PATCH] Fix potential exception --- .../java/dax/walker_engine/navigation_utils/Charter.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/dax/walker_engine/navigation_utils/Charter.java b/src/main/java/dax/walker_engine/navigation_utils/Charter.java index d0da122..1b3a659 100644 --- a/src/main/java/dax/walker_engine/navigation_utils/Charter.java +++ b/src/main/java/dax/walker_engine/navigation_utils/Charter.java @@ -62,8 +62,13 @@ private static HashMap 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; }