fix nil pointer

This commit is contained in:
leviok
2020-11-23 11:08:21 +08:00
committed by zhangkun
parent 375b7a1c4c
commit 9b199f0476
+2
View File
@@ -792,6 +792,8 @@ func (a *StateAPI) StateSectorPreCommitInfo(ctx context.Context, maddr address.A
pci, err := stmgr.PreCommitInfo(ctx, a.StateManager, maddr, n, ts)
if err != nil {
return miner.SectorPreCommitOnChainInfo{}, err
} else if pci == nil {
return miner.SectorPreCommitOnChainInfo{}, nil
}
return *pci, err