fix: cli: check found before dereferencing SectorInfo

This commit is contained in:
Aayush 2022-11-22 12:06:45 -05:00
parent 64de59ab44
commit b472de1bcd

View File

@ -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)
}