summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Objects/abstract.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index a9c6d6b9e5..38ddb0f3df 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2073,7 +2073,8 @@ PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw)
"NULL result without error in PyObject_Call");
}
#else
- assert(result != NULL || PyErr_Occurred());
+ assert((result != NULL && !PyErr_Occurred())
+ || (result == NULL && PyErr_Occurred()));
#endif
return result;
}