Commit 26771be4 authored by Rein Klazes's avatar Rein Klazes Committed by Alexandre Julliard

SafeArrayDestroy() returns success when called with a NULL

pointer. Added to the test cases.
parent e495e7e3
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment