mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-21 20:55:11 +00:00
fix: handle NULL correctly (#5145)
This commit is contained in:
parent
86a64290dc
commit
ce08e37042
@ -2780,7 +2780,7 @@ get_type_override(const void *this_ptr, const type_info *this_type, const char *
|
||||
PyObject *locals = PyEval_GetFrameLocals();
|
||||
# else
|
||||
PyObject *locals = PyEval_GetLocals();
|
||||
Py_INCREF(locals);
|
||||
Py_XINCREF(locals);
|
||||
# endif
|
||||
if (locals != nullptr) {
|
||||
# if PY_VERSION_HEX >= 0x030b0000
|
||||
|
Loading…
Reference in New Issue
Block a user