SafeArrayDestroy() returns success when called with a NULL
pointer. Added to the test cases.
This commit is contained in:
parent
e495e7e34c
commit
26771be4da
|
@ -1337,7 +1337,7 @@ HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
|
|||
TRACE("(%p)\n", psa);
|
||||
|
||||
if(!psa)
|
||||
return E_INVALIDARG;
|
||||
return S_OK;
|
||||
|
||||
if(psa->cLocks > 0)
|
||||
return DISP_E_ARRAYISLOCKED;
|
||||
|
|
|
@ -258,6 +258,9 @@ static void test_safearray(void)
|
|||
LONG l;
|
||||
unsigned char *ptr1, *ptr2;
|
||||
|
||||
hres = SafeArrayDestroy( NULL);
|
||||
ok( hres == S_OK, "SafeArrayDestroy( NULL) returned 0x%lx\n", hres);
|
||||
|
||||
bound.cElements = 1;
|
||||
bound.lLbound = 0;
|
||||
a = SafeArrayCreate(-1, 1, &bound);
|
||||
|
|
Loading…
Reference in New Issue