commit | bd9ccca81206cb4efc78ece65e079e729932de7f | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Thu Apr 09 14:58:08 1992 +0000 |
committer | Guido van Rossum <guido@python.org> | Thu Apr 09 14:58:08 1992 +0000 |
tree | eeb42e9cd60d7c77915111821ea841c9a5b46613 | |
parent | 801dcae64de385f26963f95f825c4df395366adf [diff] |
Test for NULL coming out of err_get() in call_exc_trace()
diff --git a/Python/ceval.c b/Python/ceval.c index ea1a785..0b2f924 100644 --- a/Python/ceval.c +++ b/Python/ceval.c
@@ -1189,6 +1189,10 @@ object *type, *value, *traceback, *arg; int err; err_get(&type, &value); + if (value == NULL) { + value = None; + INCREF(value); + } traceback = tb_fetch(); arg = newtupleobject(3); if (arg == NULL)