Fix nil pointer exception in frontier building.
This commit is contained in:
parent
896e172463
commit
bb9c5ed7aa
|
@ -44,7 +44,7 @@ func (f *diskFrontier) ContainsFingerprint(fingerprint model.Fingerprint) bool {
|
||||||
|
|
||||||
func newDiskFrontier(i iterator) (d *diskFrontier, err error) {
|
func newDiskFrontier(i iterator) (d *diskFrontier, err error) {
|
||||||
i.SeekToLast()
|
i.SeekToLast()
|
||||||
if i.Key() == nil {
|
if !i.Valid() || i.Key() == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
lastKey, err := extractSampleKey(i)
|
lastKey, err := extractSampleKey(i)
|
||||||
|
|
Loading…
Reference in New Issue