null check to fix junit test

This commit is contained in:
Andy Janata 2013-02-03 11:02:51 -08:00
parent e436a63cf1
commit df6be2ea00
1 changed files with 3 additions and 1 deletions

View File

@ -268,7 +268,9 @@ public class Game {
}
// this seems terrible
if (players.size() == 0) {
hibernateSession.close();
if (null != hibernateSession) {
hibernateSession.close();
}
gameManager.destroyGame(id);
}
if (players.size() < 3 && state != GameState.LOBBY) {