mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Minor fixes in table manager and matchImpl.
This commit is contained in:
parent
ec1327199d
commit
cbeab91889
2 changed files with 3 additions and 1 deletions
|
@ -210,7 +210,8 @@ public class TableManager {
|
|||
controllers.remove(tableId);
|
||||
tables.remove(tableId);
|
||||
GamesRoomManager.getInstance().removeTable(tableId);
|
||||
table.getMatch().getGame().end();
|
||||
if (table.getMatch().getGame() != null)
|
||||
table.getMatch().getGame().end();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ public abstract class MatchImpl implements Match {
|
|||
|
||||
@Override
|
||||
public Game getGame() {
|
||||
if (games.size() == 0) return null;
|
||||
return games.get(games.size() -1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue