Handled NullPointerException in closeLobby

This commit is contained in:
Seraina 2022-04-18 13:43:57 +02:00
parent 08f9f44fab
commit 1257d102b8

View File

@ -235,7 +235,11 @@ public class Lobby {
*/
public void closeLobby() {
lobbies.remove(this);
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.");
/*