Add more panic() calls for invalid conditions

This commit is contained in:
Alexander Neumann
2015-10-11 20:45:42 +02:00
parent 7db2369081
commit f188cf81dc
2 changed files with 11 additions and 0 deletions

View File

@@ -215,6 +215,10 @@ func (idx *Index) generatePackList(selectFn func(indexEntry) bool) ([]*packJSON,
packs := make(map[backend.ID]*packJSON)
for id, blob := range idx.pack {
if blob.packID == nil {
panic("nil pack id")
}
if selectFn != nil && !selectFn(blob) {
continue
}