From 153acb7f644d755c45533b7c5311e3ffa47e8973 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 18 Sep 2026 05:31:09 -0400 Subject: fix: harden engine across casino, economy, concurrency, security, and content --- internal/game/cmd_color.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'internal/game/cmd_color.go') diff --git a/internal/game/cmd_color.go b/internal/game/cmd_color.go index 614583f..104d359 100644 --- a/internal/game/cmd_color.go +++ b/internal/game/cmd_color.go @@ -67,6 +67,12 @@ func (g *Game) doColor(sess *net.Session, input string) { } func (g *Game) saveAccountColor(sess *net.Session, target, value string) { + // The account can be gone (purged or republished from another session) + // while the player is still live; there is nothing to persist to then. + if sess.Account == nil { + sess.WriteLine("You must be logged into an account to set colors.") + return + } if value == "" { if sess.Account.Colors != nil { delete(sess.Account.Colors, target) -- cgit v1.2.3