Skip to content

Commit

Permalink
fix: handle NULL correctly (#5145)
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii authored May 27, 2024
1 parent 86a6429 commit ce08e37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/pybind11/pybind11.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ce08e37

Please sign in to comment.