uxtheme: Set last error on NULL pointer.

This commit is contained in:
Alistair Leslie-Hughes 2011-08-30 23:15:25 +10:00 committed by Alexandre Julliard
parent 956487434d
commit 81079ef35b
2 changed files with 10 additions and 8 deletions

View File

@ -641,6 +641,12 @@ HTHEME WINAPI OpenThemeDataEx(HWND hwnd, LPCWSTR pszClassList, DWORD flags)
HTHEME hTheme = NULL;
TRACE("(%p,%s, %x)\n", hwnd, debugstr_w(pszClassList), flags);
if(!pszClassList)
{
SetLastError(E_POINTER);
return NULL;
}
if(flags)
FIXME("unhandled flags: %x\n", flags);

View File

@ -192,8 +192,7 @@ static void test_OpenThemeData(void)
SetLastError(0xdeadbeef);
hTheme = pOpenThemeData(NULL, NULL);
ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme);
todo_wine
ok( GetLastError() == E_POINTER,
ok( GetLastError() == E_POINTER,
"Expected GLE() to be E_POINTER, got 0x%08x\n",
GetLastError());
@ -232,8 +231,7 @@ static void test_OpenThemeData(void)
SetLastError(0xdeadbeef);
hTheme = pOpenThemeData(hWnd, NULL);
ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme);
todo_wine
ok( GetLastError() == E_POINTER,
ok( GetLastError() == E_POINTER,
"Expected GLE() to be E_POINTER, got 0x%08x\n",
GetLastError());
@ -359,8 +357,7 @@ static void test_OpenThemeDataEx(void)
SetLastError(0xdeadbeef);
hTheme = pOpenThemeDataEx(NULL, NULL, 0);
ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme);
todo_wine
ok( GetLastError() == E_POINTER,
ok( GetLastError() == E_POINTER,
"Expected GLE() to be E_POINTER, got 0x%08x\n",
GetLastError());
@ -399,8 +396,7 @@ static void test_OpenThemeDataEx(void)
SetLastError(0xdeadbeef);
hTheme = pOpenThemeDataEx(hWnd, NULL, 0);
ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme);
todo_wine
ok( GetLastError() == E_POINTER,
ok( GetLastError() == E_POINTER,
"Expected GLE() to be E_POINTER, got 0x%08x\n",
GetLastError());