Fixed NPE for loading tests where Option is null. getPriorityTime returns the same number

This commit is contained in:
magenoxx 2017-04-19 11:48:10 +03:00 committed by ayratn
parent 1ef6866e42
commit b04e13aa4b

View file

@ -28,12 +28,6 @@
package mage.view;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import mage.constants.SkillLevel;
import mage.constants.TableState;
import mage.game.Game;
@ -43,6 +37,12 @@ import mage.game.draft.Draft;
import mage.game.match.MatchPlayer;
import mage.game.tournament.TournamentPlayer;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
/**
* @author BetaSteward_at_googlemail.com
*/
@ -123,7 +123,7 @@ public class TableView implements Serializable {
StringBuilder addInfo = new StringBuilder();
if (table.getMatch().getGames().isEmpty()) {
addInfo.append("Wins:").append(table.getMatch().getWinsNeeded());
addInfo.append(" Time: ").append(table.getMatch().getOptions().getMatchTimeLimit().toString());
addInfo.append(" Time: ").append(table.getMatch().getOptions().getPriorityTime());
if (table.getMatch().getFreeMulligans() > 0) {
addInfo.append(" Free Mul.: ").append(table.getMatch().getFreeMulligans());
}