fix infoText of tournament causing NPE (#11290)

This commit is contained in:
Susucre 2023-10-09 21:25:30 +02:00 committed by GitHub
parent d7afa37893
commit b8ba2da23e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -174,11 +174,11 @@ public class TableView implements Serializable {
if (tourneyMatchOptions.getFreeMulligans() > 0) { if (tourneyMatchOptions.getFreeMulligans() > 0) {
infoText.append(" FM: ").append(tourneyMatchOptions.getFreeMulligans()); infoText.append(" FM: ").append(tourneyMatchOptions.getFreeMulligans());
} }
if (table.getMatch().getOptions().isCustomStartLifeEnabled()) { if (tourneyMatchOptions.isCustomStartLifeEnabled()) {
infoText.append(" StartLife: ").append(table.getMatch().getOptions().getCustomStartLife()); infoText.append(" StartLife: ").append(tourneyMatchOptions.getCustomStartLife());
} }
if (table.getMatch().getOptions().isCustomStartHandSizeEnabled()) { if (tourneyMatchOptions.isCustomStartHandSizeEnabled()) {
infoText.append(" StartHandSize: ").append(table.getMatch().getOptions().getCustomStartHandSize()); infoText.append(" StartHandSize: ").append(tourneyMatchOptions.getCustomStartHandSize());
} }
if (table.getTournament().getTournamentType().isLimited()) { if (table.getTournament().getTournamentType().isLimited()) {
infoText.append(" Constr.: ").append(table.getTournament().getOptions().getLimitedOptions().getConstructionTime() / 60).append(" Min."); infoText.append(" Constr.: ").append(table.getTournament().getOptions().getLimitedOptions().getConstructionTime() / 60).append(" Min.");