Fix crash when no theme is set and application ignores errors.
This commit is contained in:
parent
e5013299e0
commit
399842b136
|
@ -405,6 +405,10 @@ HRESULT WINAPI HitTestThemeBackground(HTHEME hTheme, HDC hdc, int iPartId,
|
||||||
BOOL WINAPI IsThemePartDefined(HTHEME hTheme, int iPartId, int iStateId)
|
BOOL WINAPI IsThemePartDefined(HTHEME hTheme, int iPartId, int iStateId)
|
||||||
{
|
{
|
||||||
TRACE("(%p,%d,%d)\n", hTheme, iPartId, iStateId);
|
TRACE("(%p,%d,%d)\n", hTheme, iPartId, iStateId);
|
||||||
|
if(!hTheme) {
|
||||||
|
SetLastError(E_HANDLE);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
if(MSSTYLES_FindPartState(hTheme, iPartId, iStateId, NULL))
|
if(MSSTYLES_FindPartState(hTheme, iPartId, iStateId, NULL))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue