1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-10 01:01:05 -09:00

Minor fixes in table manager and matchImpl.

This commit is contained in:
magenoxx 2011-05-19 23:49:15 +04:00
parent ec1327199d
commit cbeab91889
2 changed files with 3 additions and 1 deletions
Mage.Server/src/main/java/mage/server
Mage/src/mage/game/match

View file

@ -210,7 +210,8 @@ public class TableManager {
controllers.remove(tableId); controllers.remove(tableId);
tables.remove(tableId); tables.remove(tableId);
GamesRoomManager.getInstance().removeTable(tableId); GamesRoomManager.getInstance().removeTable(tableId);
table.getMatch().getGame().end(); if (table.getMatch().getGame() != null)
table.getMatch().getGame().end();
} }
} }

View file

@ -103,6 +103,7 @@ public abstract class MatchImpl implements Match {
@Override @Override
public Game getGame() { public Game getGame() {
if (games.size() == 0) return null;
return games.get(games.size() -1); return games.get(games.size() -1);
} }