diff --git a/util/imagetools/printers.go b/util/imagetools/printers.go index 4a4ab621..3e973a86 100644 --- a/util/imagetools/printers.go +++ b/util/imagetools/printers.go @@ -59,7 +59,9 @@ func NewPrinter(ctx context.Context, opt Opt, name string, format string) (*Prin switch manifest.MediaType { case images.MediaTypeDockerSchema2ManifestList, ocispecs.MediaTypeImageIndex: for _, m := range index.Manifests { - pforms = append(pforms, *m.Platform) + if m.Platform != nil { + pforms = append(pforms, *m.Platform) + } } default: pforms = append(pforms, platforms.DefaultSpec())