fix(tracker/gioui): short action key pressed without handler crash

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-10-19 16:22:07 +03:00
parent 7a43aec50e
commit de366316d4

View File

@ -281,7 +281,7 @@ func (t *Tracker) KeyEvent(e key.Event, gtx C) {
case "FocusNextInto":
t.FocusNext(gtx, true)
default:
if action[:4] == "Note" {
if len(action) > 4 && action[:4] == "Note" {
val, err := strconv.Atoi(string(action[4:]))
if err != nil {
break