storage: Don't add empty mmaps to the mmap span

This commit is contained in:
Matt Joiner 2017-09-18 13:41:19 +10:00
parent 0790516440
commit 9e6cdff175
1 changed files with 3 additions and 1 deletions

View File

@ -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
}