summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS2
-rw-r--r--Objects/genobject.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 826ad85860..05414e365a 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 3.3.2?
Core and Builtins
-----------------
+- Issue #17669: Fix crash involving finalization of generators using yield from.
+
- Issue #17619: Make input() check for Ctrl-C correctly on Windows.
- Issue #17610: Don't rely on non-standard behavior of the C qsort() function.
diff --git a/Objects/genobject.c b/Objects/genobject.c
index 597aed37a1..016bfa2975 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -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);