0
0
Fork 0

adding nil check

This commit is contained in:
Sreekanth Sivasankaran 2018-03-27 22:10:09 +05:30 committed by GitHub
parent 72ac352961
commit db6a2c274f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ func (i *PostingsIterator) Advance(docNumber uint64) (segment.Posting, error) {
return &i.reuse, nil
}
next, err := i.Next()
if err != nil {
if err != nil || next == nil {
return next, err
}