mirror of
https://github.com/reactos/reactos.git
synced 2024-09-10 12:54:51 +00:00
add a NULL check in IntGdiInitBrushInstance if XlateObj is NULL fall back to use white as default color when GDIBRUSH_IS_SOLID are set.
svn path=/trunk/; revision=33877
This commit is contained in:
parent
48150abcea
commit
12528a2fc8
|
@ -173,11 +173,25 @@ IntGdiInitBrushInstance(GDIBRUSHINST *BrushInst, PGDIBRUSHOBJ BrushObj, XLATEOBJ
|
|||
ASSERT(BrushInst);
|
||||
ASSERT(BrushObj);
|
||||
if (BrushObj->flAttrs & GDIBRUSH_IS_NULL)
|
||||
{
|
||||
BrushInst->BrushObject.iSolidColor = 0;
|
||||
}
|
||||
else if (BrushObj->flAttrs & GDIBRUSH_IS_SOLID)
|
||||
{
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue