Skip to content

Commit 0df8511

Browse files
cpegericashvardanian
authored andcommitted
Add: Nil handler validation in FilteredSearchUnsafe
1 parent a17c6fa commit 0df8511

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

golang/lib.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,11 @@ func (index *Index) FilteredSearchUnsafe(query unsafe.Pointer, limit uint, handl
696696
if query == nil {
697697
return nil, nil, errors.New("query pointer cannot be nil")
698698
}
699+
700+
if handler == nil {
701+
return nil, nil, errors.New("filtered search handler cannot be nil")
702+
}
703+
699704
if limit == 0 {
700705
return []Key{}, []float32{}, nil
701706
}

0 commit comments

Comments
 (0)