]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Test for NULL coming out of err_get() in call_exc_trace()
authorGuido van Rossum <guido@python.org>
Thu, 9 Apr 1992 14:58:08 +0000 (14:58 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 9 Apr 1992 14:58:08 +0000 (14:58 +0000)
Python/ceval.c

index ea1a78590b7ca7fd89df4951e8a4416d70fefee4..0b2f924a84d7d3bfd13dd2775391ebee2f624233 100644 (file)
@@ -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)