Prevent panic if index is out of bounds
This commit is contained in:
parent
55015bcf6f
commit
aa3a5b4978
@ -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{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user