diff options
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/errors.c b/Python/errors.c index 6a42f5912f..05ef62246e 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -37,8 +37,7 @@ _PyErr_Restore(PyThreadState *tstate, PyObject *type, PyObject *value, if (traceback != NULL && !PyTraceBack_Check(traceback)) { /* XXX Should never happen -- fatal error instead? */ /* Well, it could be None. */ - Py_DECREF(traceback); - traceback = NULL; + Py_SETREF(traceback, NULL); } /* Save these in locals to safeguard against recursive |