From a0db7bb48e876fc3262c89a232b2fed1de8cf6e4 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 22 Jul 2025 16:16:41 -0400 Subject: do not pass nil selections to prompt --- go/client/keybindings.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/go/client/keybindings.go b/go/client/keybindings.go index 1dbf6bea..147afced 100644 --- a/go/client/keybindings.go +++ b/go/client/keybindings.go @@ -60,6 +60,9 @@ func (g *Game) handleKeyBindings(bindings keyBindings) (err error) { func selection(ev ui.InputEvent, g *Game) (bool, error) { x, y := ev.X, ev.Y obj := g.findObjectAt(x, y) + if obj == nil { + return false, nil + } if g.prompt != nil { if err := g.prompt.Add(obj); err != nil { -- cgit v1.2.3