fix-assert.patch 436 B

123456789101112
  1. --- a/include/pybind11/detail/type_caster_base.h (index)
  2. +++ b/include/pybind11/detail/type_caster_base.h (working tree)
  3. @@ -70,7 +70,8 @@ public:
  4. if (get_stack_top() != this) {
  5. pybind11_fail("loader_life_support: internal error");
  6. }
  7. - set_stack_top(parent);
  8. + if (parent)
  9. + set_stack_top(parent);
  10. for (auto *item : keep_alive) {
  11. Py_DECREF(item);
  12. }