mirror of
https://github.com/vsariola/sointu.git
synced 2025-11-12 12:52:53 -05:00
fix(tracker/gioui): short action key pressed without handler crash
This commit is contained in:
parent
7a43aec50e
commit
de366316d4
@ -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
|
||||
|
||||
Reference in New Issue
Block a user