Fix an incorrect check in compiler_try_except(). (GH-9810)

This commit is contained in:
Zackery Spytz 2018-10-11 23:54:03 -06:00 committed by Serhiy Storchaka
parent fc439d20de
commit 53ebf4b070
1 changed files with 2 additions and 1 deletions

View File

@ -2738,8 +2738,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);