Skip to content

Commit f981223

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 68b0f81 commit f981223

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
@@ -86,6 +86,9 @@ func (r *diffRemote) Compare(ctx context.Context, a, b []mount.Mount, opts ...di
8686
}
8787

8888
func toDescriptor(d *types.Descriptor) ocispec.Descriptor {
89+
if d == nil {
90+
return ocispec.Descriptor{}
91+
}
8992
return ocispec.Descriptor{
9093
MediaType: d.MediaType,
9194
Digest: d.Digest,

0 commit comments

Comments
 (0)