diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-07-22 16:16:41 -0400 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-07-24 12:22:10 -0400 |
| commit | a0db7bb48e876fc3262c89a232b2fed1de8cf6e4 (patch) | |
| tree | 6b7a76a8507b4d174cc1a1b61863d492d0bb9b89 /go/client | |
| parent | ee963b2772d6416fae9a11ffe7414b3e7eda7301 (diff) | |
| download | muhqs-game-a0db7bb48e876fc3262c89a232b2fed1de8cf6e4.tar.gz muhqs-game-a0db7bb48e876fc3262c89a232b2fed1de8cf6e4.zip | |
do not pass nil selections to prompt
Diffstat (limited to 'go/client')
| -rw-r--r-- | go/client/keybindings.go | 3 |
1 files changed, 3 insertions, 0 deletions
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 { |
