From 946af6913d3e031baac154285f9c913d0c568846 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 3 Jul 2015 21:05:05 +0200 Subject: [PATCH] Fixed NPE handling. --- .../src/main/java/mage/server/game/GamesRoomImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Mage.Server/src/main/java/mage/server/game/GamesRoomImpl.java b/Mage.Server/src/main/java/mage/server/game/GamesRoomImpl.java index 485ce0252c..63edac1348 100644 --- a/Mage.Server/src/main/java/mage/server/game/GamesRoomImpl.java +++ b/Mage.Server/src/main/java/mage/server/game/GamesRoomImpl.java @@ -121,7 +121,12 @@ public class GamesRoomImpl extends RoomImpl implements GamesRoom, Serializable { users.add(new UsersView(user.getUserData().getFlagName(), user.getName(), user.getInfo(), user.getGameInfo(), user.getPingInfo())); } catch (Exception ex) { logger.fatal("User update exception: " + user.getName() + " - " + ex.toString(), ex); - users.add(new UsersView(user.getUserData().getFlagName(), user.getName(), user.getInfo(), "[exception]", user.getPingInfo())); + users.add(new UsersView( + (user.getUserData() != null && user.getUserData().getFlagName() != null) ? user.getUserData().getFlagName() : "world", + user.getName() != null ? user.getName() : "", + user.getInfo() != null ? user.getInfo() : "", + "[exception]", + user.getPingInfo() != null ? user.getPingInfo() : "")); } }