Merge pull request #9703 from filecoin-project/asr/fix-panic

fix: cli: check found before dereferencing SectorInfo
This commit is contained in:
Geoff Stuart
2022-11-22 12:54:52 -05:00
committed by GitHub
+3 -3
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)
}