Fixed NPE error in lobby

This commit is contained in:
Oleg Agafonov 2018-12-22 20:41:42 +04:00
parent baef4114d2
commit 2e3fabb161

View file

@ -43,7 +43,7 @@ public class TournamentGameView implements Serializable {
String duelingTime = "";
if (game.hasEnded()) {
if (game.getEndTime() != null) {
if (game.getEndTime() != null && game.getStartTime() != null) {
duelingTime = " (" + DateFormat.getDuration((game.getEndTime().getTime() - game.getStartTime().getTime())/1000) + ')';
}
this.state = "Finished" + duelingTime;