combase: Reorder checks (Coverity).

This commit is contained in:
Marcus Meissner 2015-01-11 23:37:03 +01:00 committed by Alexandre Julliard
parent 9d5e4edae6
commit a20e75432e

View File

@ -99,13 +99,13 @@ HRESULT WINAPI WindowsCreateStringReference(LPCWSTR ptr, UINT32 len,
return E_INVALIDARG;
if (ptr == NULL && len > 0)
return E_POINTER;
if (ptr[len] != '\0')
return E_INVALIDARG;
if (len == 0)
{
*out = NULL;
return S_OK;
}
if (ptr[len] != '\0')
return E_INVALIDARG;
priv->buffer = (LPWSTR)ptr;
priv->length = len;
priv->reference = TRUE;