If SafeArrayGetElement is called on a variant array, initialize
destination variant before copying the array element to it, some badly behaved apps don't seem to do it themselves.
This commit is contained in:
parent
a0da66945f
commit
fbdfef73f6
|
@ -356,7 +356,9 @@ HRESULT WINAPI SafeArrayGetElement(
|
|||
*((BSTR*)pv) = pbstrReturnedStr;
|
||||
}
|
||||
else if( psa->fFeatures == FADF_VARIANT) {
|
||||
HRESULT hr = VariantCopy(pv, elementStorageAddress);
|
||||
HRESULT hr;
|
||||
VariantInit(pv);
|
||||
hr = VariantCopy(pv, elementStorageAddress);
|
||||
if (FAILED(hr)) {
|
||||
SafeArrayUnlock(psa);
|
||||
return hr;
|
||||
|
|
Loading…
Reference in New Issue