[PATCH] uxtheme: SetWindowTheme should return E_HANDLE when the HWND it is passed is invalid. [try 3]
Alexandre Julliard
julliard at winehq.org
Tue Oct 28 05:20:46 CDT 2008
"Reece Dunn" <msclrhd at 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 at winehq.org
More information about the wine-devel
mailing list