diff --git a/dlls/oleaut32/safearray.c b/dlls/oleaut32/safearray.c index 4ff056ab6a7..a8a70638126 100644 --- a/dlls/oleaut32/safearray.c +++ b/dlls/oleaut32/safearray.c @@ -894,14 +894,9 @@ HRESULT WINAPI SafeArrayPutElement(SAFEARRAY *psa, LONG *rgIndices, void *pvData if (*lpDest) SysFreeString(*lpDest); - if (lpBstr) - { - *lpDest = SysAllocStringByteLen((char*)lpBstr, SysStringByteLen(lpBstr)); - if (!*lpDest) - hRet = E_OUTOFMEMORY; - } - else - *lpDest = NULL; + *lpDest = SysAllocStringByteLen((char*)lpBstr, SysStringByteLen(lpBstr)); + if (!*lpDest) + hRet = E_OUTOFMEMORY; } else {