Skip to content

Commit 3e52722

Browse files
authored
fix: nil pointer guard when no attestation is present (#185)
Signed-off-by: Miguel Martinez Trivino <[email protected]>
1 parent 22ed5a5 commit 3e52722

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controlplane/internal/service/attestation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ func (s *AttestationService) GetUploadCreds(ctx context.Context, _ *cpAPI.Attest
244244
}
245245

246246
func bizAttestationToPb(att *biz.Attestation) (*cpAPI.AttestationItem, error) {
247-
if att.Envelope == nil {
247+
if att == nil || att.Envelope == nil {
248248
return nil, nil
249249
}
250250

0 commit comments

Comments
 (0)