diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-07-22 16:16:41 -0400 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:57:28 +0200 |
| commit | d370c734b4d5684db3a8e680d0ca1a6bc88eed42 (patch) | |
| tree | b0fef935c498b68e765929129f6692d21aec3e8e /go/client | |
| parent | 785c53142cf17e3b1488b01f51ee9868e6f41416 (diff) | |
| download | muhqs-game-d370c734b4d5684db3a8e680d0ca1a6bc88eed42.tar.gz muhqs-game-d370c734b4d5684db3a8e680d0ca1a6bc88eed42.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 { |
