diff --git a/usher/usher.go b/usher/usher.go index 239c111..cfbbd51 100644 --- a/usher/usher.go +++ b/usher/usher.go @@ -34,7 +34,7 @@ func (u *Usher) CreateNewPrivateLobby(player *chess.Player) *lobbies.Lobby { func (u *Usher) FindExistingPrivateLobby(p utils.Passphrase) *lobbies.Lobby { lobby := lobbies.GetLobbyRegistry().GetLobbyByPassphrase(p) - if lobby.IsFull() { + if lobby == nil || lobby.IsFull() { return nil } return lobby