diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-06-04 17:33:33 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-06-04 17:33:33 (GMT) |
commit | 64c26e5f6004523090c52970d1ed31a351617f38 (patch) | |
tree | 1fb3d95f1e3a6b1164a2458b2e95b2a56eef4bca /Objects/frameobject.c | |
parent | a5071c2b4cff9c51fc0fd106a3d42b9a2563eb91 (diff) | |
parent | 64a263a1ceed726494767d833a2ea33033a6ae28 (diff) | |
download | cpython-64c26e5f6004523090c52970d1ed31a351617f38.zip cpython-64c26e5f6004523090c52970d1ed31a351617f38.tar.gz cpython-64c26e5f6004523090c52970d1ed31a351617f38.tar.bz2 |
Issue #20041: Fixed TypeError when frame.f_trace is set to None.
Patch by Xavier de Gaye.
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r-- | Objects/frameobject.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 492886f..b115614 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -344,6 +344,8 @@ frame_settrace(PyFrameObject *f, PyObject* v, void *closure) /* We rely on f_lineno being accurate when f_trace is set. */ f->f_lineno = PyFrame_GetLineNumber(f); + if (v == Py_None) + v = NULL; Py_XINCREF(v); Py_XSETREF(f->f_trace, v); |