Skip to content

Commit f841309

Browse files
authored
Merge pull request #3368 from mjudeikis/mjudeikis/npe
Fix npe
2 parents e72a042 + 8f065be commit f841309

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/admission/apiexport/admission.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func (e *APIExportAdmission) Validate(ctx context.Context, a admission.Attribute
9191
return admission.NewForbidden(a, err)
9292
}
9393

94-
var v2 *apisv1alpha2.APIExport
94+
v2 := new(apisv1alpha2.APIExport)
9595
err := apisv1alpha2.Convert_v1alpha1_APIExport_To_v1alpha2_APIExport(ae, v2, nil)
9696
if err != nil {
9797
return fmt.Errorf("failed to convert v1alpha1 APIExport to v1alpha2: %w", err)

0 commit comments

Comments
 (0)