Author: greatlrd
Date: Fri Jun 6 20:14:12 2008
New Revision: 33877
URL:
http://svn.reactos.org/svn/reactos?rev=33877&view=rev
Log:
add a NULL check in IntGdiInitBrushInstance if XlateObj is NULL fall back to use white as
default color when GDIBRUSH_IS_SOLID are set.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/brush.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/brush.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/brush.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/brush.c [iso-8859-1] Fri Jun 6 20:14:12
2008
@@ -173,11 +173,25 @@
ASSERT(BrushInst);
ASSERT(BrushObj);
if (BrushObj->flAttrs & GDIBRUSH_IS_NULL)
+ {
BrushInst->BrushObject.iSolidColor = 0;
+ }
else if (BrushObj->flAttrs & GDIBRUSH_IS_SOLID)
- BrushInst->BrushObject.iSolidColor = XLATEOBJ_iXlate(XlateObj,
BrushObj->BrushAttr.lbColor);
+ {
+ if (XlateObj)
+ {
+ BrushInst->BrushObject.iSolidColor = XLATEOBJ_iXlate(XlateObj,
BrushObj->BrushAttr.lbColor);
+ }
+ else
+ {
+ BrushInst->BrushObject.iSolidColor = 0xFFFFFFFF;
+ }
+ }
else
+ {
BrushInst->BrushObject.iSolidColor = 0xFFFFFFFF;
+ }
+
BrushInst->BrushObject.pvRbrush = BrushObj->ulRealization;
BrushInst->BrushObject.flColorType = 0;
BrushInst->GdiBrushObject = BrushObj;