Skip to content

Commit

Permalink
Fix drops in PyFutureAwaitable at wrong state path (#474)
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro authored Dec 24, 2024
1 parent dc3f49c commit 9465a8b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,10 @@ impl PyFutureAwaitable {
)
.is_err()
{
Python::with_gil(|_| drop(result));
Python::with_gil(|_| {
drop(result);
drop(pyself);
});
return;
}

Expand Down

0 comments on commit 9465a8b

Please sign in to comment.