aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/pybind11/patches/fix-assert.patch
blob: 2dd0cabb57ab5a5796c6920c348b7cd0467c215c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
--- a/include/pybind11/detail/type_caster_base.h	(index)
+++ b/include/pybind11/detail/type_caster_base.h	(working tree)
@@ -70,7 +70,8 @@ public:
         if (get_stack_top() != this) {
             pybind11_fail("loader_life_support: internal error");
         }
-        set_stack_top(parent);
+        if (parent)
+            set_stack_top(parent);
         for (auto *item : keep_alive) {
             Py_DECREF(item);
         }