From a95e92455cb95e157bcbc740b4b13d599f0232ac Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Fri, 18 Sep 2020 22:00:11 +0400 Subject: [PATCH] Fixed NPE on freeze fix in non started games --- .../src/main/java/mage/server/game/GameController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Mage.Server/src/main/java/mage/server/game/GameController.java b/Mage.Server/src/main/java/mage/server/game/GameController.java index e290eb3b73..ab3b8fcb8d 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameController.java +++ b/Mage.Server/src/main/java/mage/server/game/GameController.java @@ -1262,7 +1262,11 @@ public class GameController implements GameCallback { sb.append("FIX command called by ").append(user.getName()).append(""); sb.append(""); // font resize start for all next logs sb.append("
Game ID: ").append(game.getId()); - sb.append("
Phase: ").append(game.getTurn().getPhaseType().toString()).append(" Step: ").append(game.getTurn().getStepType().toString()); + if (game.getTurn().getPhaseType() == null) { + sb.append("
Phase: not started").append(" Step: not started"); + } else { + sb.append("
Phase: ").append(game.getTurn().getPhaseType().toString()).append(" Step: ").append(game.getTurn().getStepType().toString()); + } // pings info sb.append("
"); sb.append(getPingsInfo());