diff --git a/PC/winreg.c b/PC/winreg.c index 78864b1a69cfe9..0198097a1c929f 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -651,8 +651,7 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize) t = PyList_GET_ITEM(value, j); wstr = PyUnicode_AsUnicodeAndSize(t, &len); - if (wstr == NULL) - return FALSE; + assert(wstr); wcscpy(P, wstr); P += (len + 1); }