From 9e6cdff175ee2904dc945626e207321f883d64d1 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 18 Sep 2017 13:41:19 +1000 Subject: [PATCH] storage: Don't add empty mmaps to the mmap span --- storage/mmap.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storage/mmap.go b/storage/mmap.go index 94603a8c..fec9d117 100644 --- a/storage/mmap.go +++ b/storage/mmap.go @@ -105,7 +105,9 @@ func mMapTorrent(md *metainfo.Info, location string) (mms mmap_span.MMapSpan, er err = fmt.Errorf("file %q: %s", miFile.DisplayPath(md), err) return } - mms.Append(mm) + if mm != nil { + mms.Append(mm) + } } return }