Skip to content

Commit e134b63

Browse files
dmcgowanthaJeztah
authored andcommitted
Fix panic when remote differ returns empty result
Signed-off-by: Derek McGowan <[email protected]> (cherry picked from commit 0d97523) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 73ee512 commit e134b63

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

diff.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ func (r *diffRemote) Compare(ctx context.Context, a, b []mount.Mount, opts ...di
105105
}
106106

107107
func toDescriptor(d *types.Descriptor) ocispec.Descriptor {
108+
if d == nil {
109+
return ocispec.Descriptor{}
110+
}
108111
return ocispec.Descriptor{
109112
MediaType: d.MediaType,
110113
Digest: digest.Digest(d.Digest),

0 commit comments

Comments
 (0)