summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-04-10 21:01:38 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-04-10 21:01:38 (GMT)
commit34ad84d80a33c026c77389747c46e2aa272181c2 (patch)
tree588bb6b0b0f9909176991f02b9379abe46670921 /Objects
parentfe2d27d068ac4ee1773e2b7d7f5719efc2210917 (diff)
parentc9314d9e08309782010b56a41bb2d28c6a556302 (diff)
downloadcpython-34ad84d80a33c026c77389747c46e2aa272181c2.zip
cpython-34ad84d80a33c026c77389747c46e2aa272181c2.tar.gz
cpython-34ad84d80a33c026c77389747c46e2aa272181c2.tar.bz2
merge 3.3 (#17669)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/genobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c
index 597aed3..016bfa2 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);