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);
|
TRACE("(%p)\n", psa);
|
||||||
|
|
||||||
if(!psa)
|
if(!psa)
|
||||||
return E_INVALIDARG;
|
return S_OK;
|
||||||
|
|
||||||
if(psa->cLocks > 0)
|
if(psa->cLocks > 0)
|
||||||
return DISP_E_ARRAYISLOCKED;
|
return DISP_E_ARRAYISLOCKED;
|
||||||
|
|
|
@ -258,6 +258,9 @@ static void test_safearray(void)
|
||||||
LONG l;
|
LONG l;
|
||||||
unsigned char *ptr1, *ptr2;
|
unsigned char *ptr1, *ptr2;
|
||||||
|
|
||||||
|
hres = SafeArrayDestroy( NULL);
|
||||||
|
ok( hres == S_OK, "SafeArrayDestroy( NULL) returned 0x%lx\n", hres);
|
||||||
|
|
||||||
bound.cElements = 1;
|
bound.cElements = 1;
|
||||||
bound.lLbound = 0;
|
bound.lLbound = 0;
|
||||||
a = SafeArrayCreate(-1, 1, &bound);
|
a = SafeArrayCreate(-1, 1, &bound);
|
||||||
|
|
Loading…
Reference in New Issue