diff options
Diffstat (limited to 'Objects/frameobject.c')
| -rw-r--r-- | Objects/frameobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 545c1b6..94bd245 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -858,8 +858,9 @@ init_frame(_PyInterpreterFrame *frame, PyFunctionObject *func, PyObject *locals) { /* _PyFrame_InitializeSpecials consumes reference to func */ Py_INCREF(func); + Py_XINCREF(locals); PyCodeObject *code = (PyCodeObject *)func->func_code; - _PyFrame_InitializeSpecials(frame, func, locals, code->co_nlocalsplus); + _PyFrame_InitializeSpecials(frame, func, locals, code); for (Py_ssize_t i = 0; i < code->co_nlocalsplus; i++) { frame->localsplus[i] = NULL; } |
