diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 84de8ca5cbde..3b4347b44450 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -297,9 +297,9 @@ PyObject *PyUnicode_FromUnicode(const Py_UNICODE *u, unicode = unicode_latin1[*u]; if (!unicode) { unicode = _PyUnicode_New(1); - unicode->str[0] = *u; if (!unicode) return NULL; + unicode->str[0] = *u; unicode_latin1[*u] = unicode; } Py_INCREF(unicode);