diff options
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r-- | Python/_warnings.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 6a970bbb2b..1f0f58e31d 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -304,6 +304,8 @@ warn_explicit(PyObject *category, PyObject *message, } if (rc == 1) { text = PyObject_Str(message); + if (text == NULL) + goto cleanup; category = (PyObject*)message->ob_type; } else { |