diff options
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r-- | Objects/frameobject.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index bdd7862..d0a15e7 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -34,10 +34,13 @@ frame_getlocals(PyFrameObject *f, void *closure) int PyFrame_GetLineNumber(PyFrameObject *f) { - if (f->f_trace) + assert(f != NULL); + if (f->f_trace) { return f->f_lineno; - else + } + else { return PyCode_Addr2Line(f->f_code, f->f_lasti); + } } static PyObject * |