summaryrefslogtreecommitdiff
path: root/Python/errors.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/errors.c')
-rw-r--r--Python/errors.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c
index 61dc597916..6baa229ccc 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -573,7 +573,7 @@ PyErr_BadArgument(void)
PyObject *
_PyErr_NoMemory(PyThreadState *tstate)
{
- if (Py_TYPE(PyExc_MemoryError) == NULL) {
+ if (Py_IS_TYPE(PyExc_MemoryError, NULL)) {
/* PyErr_NoMemory() has been called before PyExc_MemoryError has been
initialized by _PyExc_Init() */
Py_FatalError("Out of memory and PyExc_MemoryError is not "