mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
don't run frame if it has no stack (closes #17669)
This commit is contained in:
parent
cd514cf175
commit
c9314d9e08
2 changed files with 3 additions and 1 deletions
|
@ -178,7 +178,7 @@ gen_yf(PyGenObject *gen)
|
|||
PyObject *yf = NULL;
|
||||
PyFrameObject *f = gen->gi_frame;
|
||||
|
||||
if (f) {
|
||||
if (f && f->f_stacktop) {
|
||||
PyObject *bytecode = f->f_code->co_code;
|
||||
unsigned char *code = (unsigned char *)PyBytes_AS_STRING(bytecode);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue