diff --git a/internal/coordinator/coordinator.go b/internal/coordinator/coordinator.go index ad99dd3..664ee6d 100644 --- a/internal/coordinator/coordinator.go +++ b/internal/coordinator/coordinator.go @@ -98,6 +98,13 @@ func (c *Coordinator) Coordinate(cmd *SessionCommand) *SessionCommandResult { Result: SessionRespLeft, } } + if m.Game == nil { + return &SessionCommandResult{ + ID: cmd.ID, + MatchID: m.ID, + Result: SessionRespError, + } + } resp := m.Play(cmd.ID, cmd.GameCommand) return &SessionCommandResult{ ID: cmd.ID,