From 0789c712d06119d19d966911d9a85795ba6117ae Mon Sep 17 00:00:00 2001 From: Craig Wisniewski Date: Wed, 21 Sep 2022 21:57:06 +0930 Subject: [PATCH] add logging --- .../java/net/rptools/maptool/model/InitiativeList.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/rptools/maptool/model/InitiativeList.java b/src/main/java/net/rptools/maptool/model/InitiativeList.java index f96aca38a5..75603d9a67 100644 --- a/src/main/java/net/rptools/maptool/model/InitiativeList.java +++ b/src/main/java/net/rptools/maptool/model/InitiativeList.java @@ -135,7 +135,12 @@ public InitiativeList(Zone aZone) { * @return The token initiative data for the passed index. */ public TokenInitiative getTokenInitiative(int index) { - return index < tokens.size() && index >= 0 ? tokens.get(index) : null; + if (index < tokens.size() && index >= 0) { + return tokens.get(index); + } else { + LOGGER.error("getTokenInitiative: index = " + index + ", size = " + tokens.size()); + return null; + } } /**