summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-04-09 14:58:08 (GMT)
committerGuido van Rossum <guido@python.org>1992-04-09 14:58:08 (GMT)
commitbd9ccca81206cb4efc78ece65e079e729932de7f (patch)
treeeeb42e9cd60d7c77915111821ea841c9a5b46613
parent801dcae64de385f26963f95f825c4df395366adf (diff)
downloadcpython-bd9ccca81206cb4efc78ece65e079e729932de7f.zip
cpython-bd9ccca81206cb4efc78ece65e079e729932de7f.tar.gz
cpython-bd9ccca81206cb4efc78ece65e079e729932de7f.tar.bz2
Test for NULL coming out of err_get() in call_exc_trace()
-rw-r--r--Python/ceval.c4
1 files changed, 4 insertions, 0 deletions
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 @@ call_exc_trace(p_trace, p_newtrace, f)
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)