mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-09 22:39:53 +00:00
Handle corner-case: null reflist.
This commit is contained in:
Vendored
+5
@@ -51,6 +51,11 @@ func NewPackageList() *PackageList {
|
||||
|
||||
// NewPackageListFromRefList loads packages list from PackageRefList
|
||||
func NewPackageListFromRefList(reflist *PackageRefList, collection *PackageCollection) (*PackageList, error) {
|
||||
// empty reflist
|
||||
if reflist == nil {
|
||||
return NewPackageList(), nil
|
||||
}
|
||||
|
||||
result := &PackageList{packages: make(map[string]*Package, reflist.Len())}
|
||||
|
||||
err := reflist.ForEach(func(key []byte) error {
|
||||
|
||||
Reference in New Issue
Block a user