Fixed a possible NPE in GameController.

This commit is contained in:
LevelX2 2014-06-01 23:23:22 +02:00
parent 4403934163
commit ffcdb51d1b

View file

@ -675,7 +675,7 @@ public class GameController implements GameCallback {
if (players != null && players.size() > 0) {
controller = game.getPlayer(players.get(0));
}
if (controller == null) {
if (controller == null || game.getStep() == null || game.getStep().getType() == null) {
return;
}
final String message = new StringBuilder(game.getStep().getType().toString()).append(" - Waiting for ").append(controller.getName()).toString();