fix: cli: check found before dereferencing SectorInfo
This commit is contained in:
parent
64de59ab44
commit
b472de1bcd
@ -919,12 +919,12 @@ var sectorsRenewCmd = &cli.Command{
|
||||
}
|
||||
|
||||
si, found := activeSectorsInfo[abi.SectorNumber(id)]
|
||||
if len(si.DealIDs) > 0 && cctx.Bool("only-cc") {
|
||||
continue
|
||||
}
|
||||
if !found {
|
||||
return xerrors.Errorf("sector %d is not active", id)
|
||||
}
|
||||
if len(si.DealIDs) > 0 && cctx.Bool("only-cc") {
|
||||
continue
|
||||
}
|
||||
|
||||
sis = append(sis, si)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user