Skip to content

Commit 2633815

Browse files
committed
fix: db_iter.get() should check if iterator is valid
1 parent 314572c commit 2633815

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rocksdb/_rocksdb.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,6 +2165,8 @@ cdef class BaseIterator(object):
21652165
return ret
21662166

21672167
def get(self):
2168+
if not self.ptr.Valid():
2169+
return None
21682170
cdef object ret = self.get_ob()
21692171
return ret
21702172

0 commit comments

Comments
 (0)