summaryrefslogtreecommitdiffstats
path: root/Python/executor_cases.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r--Python/executor_cases.c.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 7cc29c8..69adb20 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -806,7 +806,7 @@
PyObject *exc_value;
exc_value = stack_pointer[-1];
_PyErr_StackItem *exc_info = tstate->exc_info;
- Py_XSETREF(exc_info->exc_value, exc_value);
+ Py_XSETREF(exc_info->exc_value, exc_value == Py_None ? NULL : exc_value);
stack_pointer += -1;
break;
}