Fix crash when no theme is set and application ignores errors.

This commit is contained in:
Kevin Koltzau 2004-11-09 20:02:39 +00:00 committed by Alexandre Julliard
parent e5013299e0
commit 399842b136
1 changed files with 4 additions and 0 deletions

View File

@ -405,6 +405,10 @@ HRESULT WINAPI HitTestThemeBackground(HTHEME hTheme, HDC hdc, int iPartId,
BOOL WINAPI IsThemePartDefined(HTHEME hTheme, int iPartId, int iStateId)
{
TRACE("(%p,%d,%d)\n", hTheme, iPartId, iStateId);
if(!hTheme) {
SetLastError(E_HANDLE);
return FALSE;
}
if(MSSTYLES_FindPartState(hTheme, iPartId, iStateId, NULL))
return TRUE;
return FALSE;