From 59ea275d443c4a05cbd75d4053e704cb90a13dad Mon Sep 17 00:00:00 2001 From: riverwanderer <58135975+riverwanderer@users.noreply.github.com> Date: Mon, 4 Sep 2023 18:30:11 +0100 Subject: [PATCH] Use null-safe test on VassalNextSide. --- vassal-app/src/main/java/VASSAL/build/module/PlayerRoster.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vassal-app/src/main/java/VASSAL/build/module/PlayerRoster.java b/vassal-app/src/main/java/VASSAL/build/module/PlayerRoster.java index 7aff946bb4..87e3a2edcc 100644 --- a/vassal-app/src/main/java/VASSAL/build/module/PlayerRoster.java +++ b/vassal-app/src/main/java/VASSAL/build/module/PlayerRoster.java @@ -39,6 +39,7 @@ import VASSAL.tools.SequenceEncoder; import VASSAL.tools.swing.FlowLabel; import net.miginfocom.swing.MigLayout; +import org.apache.commons.lang3.StringUtils; import org.netbeans.spi.wizard.WizardController; import org.w3c.dom.Attr; import org.w3c.dom.Document; @@ -777,7 +778,7 @@ protected String promptForSide() { // Reserved property VassalNextSide may override hotseat default; must be an available side String nextChoice = (String) GameModule.getGameModule().getProperty("VassalNextSide"); - if (nextChoice.isEmpty() || !availableSides.contains(nextChoice)) { + if (StringUtils.isEmpty(nextChoice) || !availableSides.contains(nextChoice)) { boolean found = false; // If we find a usable side final String mySide = getMySide(); // Get our own side, so we can find the "next" one final int myidx = (mySide != null) ? sides.indexOf(mySide) : -1; // See if we have a current non-observe side.