From dbb3e6bf8a681280c1572703a9545112b0346404 Mon Sep 17 00:00:00 2001 From: Aaron Gokaslan Date: Sun, 13 Feb 2022 13:16:35 -0500 Subject: [PATCH] Fix merge bugs --- include/pybind11/detail/type_caster_base.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/pybind11/detail/type_caster_base.h b/include/pybind11/detail/type_caster_base.h index 1213b0a06..4a22eb5cc 100644 --- a/include/pybind11/detail/type_caster_base.h +++ b/include/pybind11/detail/type_caster_base.h @@ -503,8 +503,9 @@ PYBIND11_NOINLINE std::string error_string(PyObject *type, PyObject *value, PyOb int lineno = PyFrame_GetLineNumber(frame); result += " " + handle(f_code->co_filename).cast() + "(" + std::to_string(lineno) - + "): " + handle(frame->f_code->co_name).cast() + "\n"; + + "): " + handle(f_code->co_name).cast() + "\n"; frame = frame->f_back; + Py_DECREF(f_code); } #endif }