Commit 81079ef3 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

uxtheme: Set last error on NULL pointer.

parent 95648743
......@@ -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);
......
......@@ -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());
......
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