SafeArrayDestroyData - keep pointer, don't destroy data if FADF_STATIC

is set.
This commit is contained in:
Walt Ogburn 2004-10-19 21:08:02 +00:00 committed by Alexandre Julliard
parent 5d5f523052
commit bb313c9dbe

View File

@ -1254,7 +1254,8 @@ HRESULT WINAPI SafeArrayDestroyData(SAFEARRAY *psa)
if (psa->cLocks)
return DISP_E_ARRAYISLOCKED; /* Can't delete a locked array */
if (psa->pvData)
/* If static, keep pvData and don't free */
if (psa->pvData && !(psa->fFeatures & FADF_STATIC))
{
/* Delete the actual item data */
if (FAILED(SAFEARRAY_DestroyData(psa, 0)))