Handled NullPointerException in closeLobby
This commit is contained in:
parent
08f9f44fab
commit
1257d102b8
@ -235,7 +235,11 @@ public class Lobby {
|
|||||||
*/
|
*/
|
||||||
public void closeLobby() {
|
public void closeLobby() {
|
||||||
lobbies.remove(this);
|
lobbies.remove(this);
|
||||||
game.setOngoing(false); // ends game
|
try {
|
||||||
|
game.setOngoing(false); // ends game
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
LOGGER.info("No game has been started yet");
|
||||||
|
}
|
||||||
//ClientHandler.broadcastAnnouncementToAll("Lobby nr. " + this.getLobbyID() + " has been closed.");
|
//ClientHandler.broadcastAnnouncementToAll("Lobby nr. " + this.getLobbyID() + " has been closed.");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user