From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 12 Oct 2018 07:19:20 +0000 (-0700) Subject: Fix an incorrect check in compiler_try_except(). (GH-9810) X-Git-Tag: v3.7.1rc2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=72927d0d1787809b4b25e5086c5a9167bdb807bb;p=thirdparty%2FPython%2Fcpython.git Fix an incorrect check in compiler_try_except(). (GH-9810) (cherry picked from commit 53ebf4b0709f431b7262aa5daccef7eafde7383e) Co-authored-by: Zackery Spytz --- diff --git a/Python/compile.c b/Python/compile.c index b459096c6f00..3564ca2b904f 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2670,8 +2670,9 @@ compiler_try_except(struct compiler *c, stmt_ty s) cleanup_end = compiler_new_block(c); cleanup_body = compiler_new_block(c); - if (!(cleanup_end || cleanup_body)) + if (cleanup_end == NULL || cleanup_body == NULL) { return 0; + } compiler_nameop(c, handler->v.ExceptHandler.name, Store); ADDOP(c, POP_TOP);