We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8d376b commit 48b919cCopy full SHA for 48b919c
1 file changed
src/dataframe.rs
@@ -69,9 +69,11 @@ unsafe extern "C" fn drop_stream(capsule: *mut ffi::PyObject) {
69
}
70
let stream_ptr =
71
ffi::PyCapsule_GetPointer(capsule, ARROW_STREAM_NAME.as_ptr()) as *mut FFI_ArrowArrayStream;
72
- if !stream_ptr.is_null() {
73
- drop(Box::from_raw(stream_ptr));
+ if stream_ptr.is_null() {
+ ffi::PyErr_Clear();
74
+ return;
75
76
+ drop(Box::from_raw(stream_ptr));
77
78
79
// https://github.com/apache/datafusion-python/pull/1016#discussion_r1983239116
0 commit comments