- GdiIsPlayMetafileDC: function GdiGetHandleUserData might fail

- Simplify code to use GdiGetLDC which takes this into consideration, fixes a umode crash in gdi32_winetest metafile

svn path=/trunk/; revision=40379
This commit is contained in:
Gregor Schneider 2009-04-05 21:34:27 +00:00
parent d730317b41
commit feca367754

View file

@ -1157,17 +1157,10 @@ BOOL
WINAPI WINAPI
GdiIsPlayMetafileDC(HDC hDC) GdiIsPlayMetafileDC(HDC hDC)
{ {
PDC_ATTR Dc_Attr; PLDC pLDC = GdiGetLDC(hDC);
PLDC pLDC; if ( pLDC )
GdiGetHandleUserData((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr);
if ( Dc_Attr )
{ {
pLDC = Dc_Attr->pvLDC; if ( pLDC->Flags & LDC_PLAY_MFDC ) return TRUE;
if ( pLDC )
{
if ( pLDC->Flags & LDC_PLAY_MFDC ) return TRUE;
}
} }
return FALSE; return FALSE;
} }