diff options
Diffstat (limited to 'internal/game/cmd_quit.go')
| -rw-r--r-- | internal/game/cmd_quit.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/game/cmd_quit.go b/internal/game/cmd_quit.go index 249df80..0a8b8ca 100644 --- a/internal/game/cmd_quit.go +++ b/internal/game/cmd_quit.go @@ -97,7 +97,9 @@ func (g *Game) beginQuitCountdown(sess *net.Session) { // Forfeit any committed casino wager and free the seat only // now — immediately before the disconnect. Settling games only // pay seated bettors, so this forfeits a mid-round stake. - g.emitCasinoEvents(g.Casino.MarkDisconnected(p.Name)) + if g.Casino != nil { + g.emitCasinoEvents(g.Casino.MarkDisconnected(p.Name)) + } g.saveCharacter(p) g.charsMu.Lock() delete(g.loggedInChars, p.Name) |
