Prevent panic if index is out of bounds

This commit is contained in:
Ingo Oppermann 2024-10-31 12:17:53 +01:00
parent 55015bcf6f
commit aa3a5b4978
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E

View File

@ -575,8 +575,11 @@ func (r *resources) Info() Info {
Encoder: g.Encoder,
Decoder: g.Decoder,
UsageLimit: gpulimit,
Throttling: gputhrottling[i],
})
if i < len(gputhrottling) {
gpuinfo.GPU[i].Throttling = gputhrottling[i]
}
}
i := Info{