uxtheme: Fix CloseThemeData with invalid handle value.
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d070c263ad
commit
997e2046df
|
@ -746,7 +746,7 @@ void WINAPI SetThemeAppProperties(DWORD dwFlags)
|
|||
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
|
||||
{
|
||||
TRACE("(%p)\n", hTheme);
|
||||
if(!hTheme)
|
||||
if(!hTheme || hTheme == INVALID_HANDLE_VALUE)
|
||||
return E_HANDLE;
|
||||
return MSSTYLES_CloseThemeClass(hTheme);
|
||||
}
|
||||
|
|
|
@ -541,6 +541,8 @@ static void test_CloseThemeData(void)
|
|||
|
||||
hRes = pCloseThemeData(NULL);
|
||||
ok( hRes == E_HANDLE, "Expected E_HANDLE, got 0x%08x\n", hRes);
|
||||
hRes = pCloseThemeData(INVALID_HANDLE_VALUE);
|
||||
ok( hRes == E_HANDLE, "Expected E_HANDLE, got 0x%08x\n", hRes);
|
||||
}
|
||||
|
||||
START_TEST(system)
|
||||
|
|
Loading…
Reference in New Issue