[ros-diffs] [gschneider] 40379: - GdiIsPlayMetafileDC: function GdiGetHandleUserData might fail - Simplify code to use GdiGetLDC which takes this into consideration, fixes a umode crash in gdi32_winetest metafile
gschneider at svn.reactos.org
gschneider at svn.reactos.org
Sun Apr 5 23:34:28 CEST 2009
Author: gschneider
Date: Mon Apr 6 01:34:27 2009
New Revision: 40379
URL: http://svn.reactos.org/svn/reactos?rev=40379&view=rev
Log:
- GdiIsPlayMetafileDC: function GdiGetHandleUserData might fail
- Simplify code to use GdiGetLDC which takes this into consideration, fixes a umode crash in gdi32_winetest metafile
Modified:
trunk/reactos/dll/win32/gdi32/misc/stubs.c
Modified: trunk/reactos/dll/win32/gdi32/misc/stubs.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubs.c?rev=40379&r1=40378&r2=40379&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/misc/stubs.c [iso-8859-1] Mon Apr 6 01:34:27 2009
@@ -1157,17 +1157,10 @@
WINAPI
GdiIsPlayMetafileDC(HDC hDC)
{
- PDC_ATTR Dc_Attr;
- PLDC pLDC;
-
- GdiGetHandleUserData((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr);
- if ( Dc_Attr )
+ PLDC pLDC = GdiGetLDC(hDC);
+ if ( pLDC )
{
- pLDC = Dc_Attr->pvLDC;
- if ( pLDC )
- {
- if ( pLDC->Flags & LDC_PLAY_MFDC ) return TRUE;
- }
+ if ( pLDC->Flags & LDC_PLAY_MFDC ) return TRUE;
}
return FALSE;
}
More information about the Ros-diffs
mailing list