diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-04-13 13:18:28 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-04-13 13:18:28 -0600 |
commit | f37ad3c90dab9b77e7c2796e963f5992458ad4a4 (patch) | |
tree | 631f9de458b9b91b02fe07e2a812233a3ac20520 /lib/btrfs | |
parent | c262f37c6a0ba64d39414b45fd54d172c50762c8 (diff) | |
parent | 7726e27f3b79e031fe9a9ea9504dea5df0327e02 (diff) |
Merge branch 'lukeshu/fixes'
Diffstat (limited to 'lib/btrfs')
-rw-r--r-- | lib/btrfs/btrfsitem/item_extent.go | 4 | ||||
-rw-r--r-- | lib/btrfs/btrfsitem/item_metadata.go | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/btrfs/btrfsitem/item_extent.go b/lib/btrfs/btrfsitem/item_extent.go index edfef7c..cf9b739 100644 --- a/lib/btrfs/btrfsitem/item_extent.go +++ b/lib/btrfs/btrfsitem/item_extent.go @@ -54,7 +54,9 @@ func (o Extent) Clone() Extent { ret.Refs = extentInlineRefPool.Get(len(o.Refs)) copy(ret.Refs, o.Refs) for i := range ret.Refs { - ret.Refs[i].Body = o.Refs[i].Body.CloneItem() + if o.Refs[i].Body != nil { + ret.Refs[i].Body = o.Refs[i].Body.CloneItem() + } } return ret } diff --git a/lib/btrfs/btrfsitem/item_metadata.go b/lib/btrfs/btrfsitem/item_metadata.go index 10ae994..90f7622 100644 --- a/lib/btrfs/btrfsitem/item_metadata.go +++ b/lib/btrfs/btrfsitem/item_metadata.go @@ -46,7 +46,9 @@ func (o Metadata) Clone() Metadata { ret.Refs = extentInlineRefPool.Get(len(o.Refs)) copy(ret.Refs, o.Refs) for i := range ret.Refs { - ret.Refs[i].Body = o.Refs[i].Body.CloneItem() + if o.Refs[i].Body != nil { + ret.Refs[i].Body = o.Refs[i].Body.CloneItem() + } } return ret } |