Skip to content

Commit 0d97523

Browse files
committed
Fix panic when remote differ returns empty result
Signed-off-by: Derek McGowan <[email protected]>
1 parent 54732fa commit 0d97523

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

diff/proxy/differ.go

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

102102
func toDescriptor(d *types.Descriptor) ocispec.Descriptor {
103+
if d == nil {
104+
return ocispec.Descriptor{}
105+
}
103106
return ocispec.Descriptor{
104107
MediaType: d.MediaType,
105108
Digest: digest.Digest(d.Digest),

0 commit comments

Comments
 (0)