fix(tracker/gioui): crash when recovered synth was panicced

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-11-01 00:29:27 +02:00
parent 91c9701f14
commit 1dbe351beb

View File

@ -117,6 +117,9 @@ func (t *SongPanel) layoutSongOptions(gtx C) D {
cpuSmallLabel := func(gtx C) D {
var a [vm.MAX_THREADS]sointu.CPULoad
c := tr.Model.CPULoad(a[:])
if c < 1 {
return D{}
}
load := slices.Max(a[:c])
cpuLabel := Label(tr.Theme, &tr.Theme.SongPanel.RowValue, fmt.Sprintf("%d%%", int(load*100+0.5)))
if load >= 1 {