mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Fixed possible NPE in GameController.
This commit is contained in:
parent
0da17569cc
commit
c58ecf366b
1 changed files with 8 additions and 1 deletions
|
@ -633,7 +633,14 @@ public class GameController implements GameCallback {
|
|||
|
||||
private void informOthers(List<UUID> players) throws MageException {
|
||||
// first player is always original controller
|
||||
final String message = new StringBuilder(game.getStep().toString()).append(" - Waiting for ").append(game.getPlayer(players.get(0)).getName()).toString();
|
||||
Player controller = null;
|
||||
if (players != null && players.size() > 0) {
|
||||
controller = game.getPlayer(players.get(0));
|
||||
}
|
||||
if (controller == null) {
|
||||
return;
|
||||
}
|
||||
final String message = new StringBuilder(game.getStep().toString()).append(" - Waiting for ").append(controller.getName()).toString();
|
||||
for (final Entry<UUID, GameSession> entry: gameSessions.entrySet()) {
|
||||
boolean skip = false;
|
||||
for (UUID uuid : players) {
|
||||
|
|
Loading…
Reference in a new issue