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; HTHEME hTheme = NULL;
TRACE("(%p,%s, %x)\n", hwnd, debugstr_w(pszClassList), flags); TRACE("(%p,%s, %x)\n", hwnd, debugstr_w(pszClassList), flags);
if(!pszClassList)
{
SetLastError(E_POINTER);
return NULL;
}
if(flags) if(flags)
FIXME("unhandled flags: %x\n", flags); FIXME("unhandled flags: %x\n", flags);

View File

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