null check to fix junit test
This commit is contained in:
parent
e436a63cf1
commit
df6be2ea00
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue