perform nil check before iterating over keys

pull/6/head
juanvallejo 2017-10-12 16:25:31 -04:00
parent efe6180806
commit 1fcd410d4a
No known key found for this signature in database
GPG Key ID: 7D2C958002D6448D
1 changed files with 4 additions and 0 deletions

View File

@ -539,6 +539,10 @@ func (f *DeltaFIFO) Resync() error {
f.lock.Lock() f.lock.Lock()
defer f.lock.Unlock() defer f.lock.Unlock()
if f.knownObjects == nil {
return nil
}
keys := f.knownObjects.ListKeys() keys := f.knownObjects.ListKeys()
for _, k := range keys { for _, k := range keys {
if err := f.syncKeyLocked(k); err != nil { if err := f.syncKeyLocked(k); err != nil {