From: Victor Stinner Date: Tue, 5 Nov 2013 17:07:34 +0000 (+0100) Subject: Issue #19437: Fix compiler_class(), handle compiler_lookup_arg() failure X-Git-Tag: v3.4.0b1~384 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=98e818b8e37692faae15c792397765b0bc0ef7ea;p=thirdparty%2FPython%2Fcpython.git Issue #19437: Fix compiler_class(), handle compiler_lookup_arg() failure --- diff --git a/Python/compile.c b/Python/compile.c index 32465f716929..8b00211c9fd0 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -1772,6 +1772,10 @@ compiler_class(struct compiler *c, stmt_ty s) } i = compiler_lookup_arg(c->u->u_cellvars, str); Py_DECREF(str); + if (i < 0) { + compiler_exit_scope(c); + return 0; + } assert(i == 0); /* Return the cell where to store __class__ */ ADDOP_I(c, LOAD_CLOSURE, i);