Re: [PATCH] uxtheme: SetWindowTheme should return E_HANDLE when the HWND it is passed is invalid. [try 3]
28 Oct
2008
28 Oct
'08
10:20 a.m.
"Reece Dunn" <msclrhd(a)googlemail.com> writes:
@@ -691,11 +691,21 @@ HRESULT WINAPI SetWindowTheme(HWND hwnd, LPCWSTR pszSubAppName, HRESULT hr; TRACE("(%p,%s,%s)\n", hwnd, debugstr_w(pszSubAppName), debugstr_w(pszSubIdList)); + + if(!IsWindow(hwnd)) + { + hr = E_HANDLE; + goto error; + }
You shouldn't add IsWindow() checks. The error must be detected and handled at the place where the window handle is actually used. -- Alexandre Julliard julliard(a)winehq.org
6257
Age (days ago)
6257
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard