- Fix if param Brush == NULL.
- See issue #4220 for details.
svn path=/trunk/; revision=39870
else
{
/* FIXME: Shouldn't it be expanded? */
else
{
/* FIXME: Shouldn't it be expanded? */
- Pattern = BltInfo->Brush->iSolidColor;
+ if (BltInfo->Brush)
+ Pattern = BltInfo->Brush->iSolidColor;
- Pattern = BltInfo->Brush->iSolidColor;
+ if (BltInfo->Brush)
+ Pattern = BltInfo->Brush->iSolidColor;
- Pattern = ExpandSolidColor[BltInfo->Brush->iSolidColor];
+ if (BltInfo->Brush)
+ Pattern = ExpandSolidColor[BltInfo->Brush->iSolidColor];
dx = DestRect->right - DestRect->left;
dy = DestRect->bottom - DestRect->top;
dx = DestRect->right - DestRect->left;
dy = DestRect->bottom - DestRect->top;
- if (Brush->iSolidColor == 0xFFFFFFFF)
+ if (Brush && Brush->iSolidColor == 0xFFFFFFFF)
{
GdiBrush = CONTAINING_RECORD(
Brush,
{
GdiBrush = CONTAINING_RECORD(
Brush,
if (psurfPattern == NULL)
{
DibFunctionsForBitmapFormat[Dest->iBitmapFormat].DIB_PutPixel(
if (psurfPattern == NULL)
{
DibFunctionsForBitmapFormat[Dest->iBitmapFormat].DIB_PutPixel(
- Dest, DestRect->left + i, DestRect->top + j, Brush->iSolidColor);
+ Dest, DestRect->left + i, DestRect->top + j, Brush ? Brush->iSolidColor : 0);
}
else
{
DibFunctionsForBitmapFormat[Dest->iBitmapFormat].DIB_PutPixel(
Dest, DestRect->left + i, DestRect->top + j,
}
else
{
DibFunctionsForBitmapFormat[Dest->iBitmapFormat].DIB_PutPixel(
Dest, DestRect->left + i, DestRect->top + j,
- DIB_GetSource(psoPattern, (DestRect->left + i) % PatternWidth, PatternY, GdiBrush->XlateObject));
+ DIB_GetSource(psoPattern, (DestRect->left + i) % PatternWidth, PatternY, GdiBrush ? GdiBrush->XlateObject : NULL));
// These functions are assigned if we're working with a DIB
// The assigned functions depend on the bitsPerPixel of the DIB
// These functions are assigned if we're working with a DIB
// The assigned functions depend on the bitsPerPixel of the DIB
- DibFunctionsForBitmapFormat[Dest->iBitmapFormat].DIB_ColorFill(Dest, DestRect, Brush->iSolidColor);
+ DibFunctionsForBitmapFormat[Dest->iBitmapFormat].DIB_ColorFill(Dest, DestRect, Brush ? Brush->iSolidColor : 0);
BltInfo.Rop4 = Rop4;
/* Pattern brush */
BltInfo.Rop4 = Rop4;
/* Pattern brush */
- if (ROP4_USES_PATTERN(Rop4) && Brush->iSolidColor == 0xFFFFFFFF)
+ if (ROP4_USES_PATTERN(Rop4) && Brush && Brush->iSolidColor == 0xFFFFFFFF)
{
GdiBrush = CONTAINING_RECORD(Brush, GDIBRUSHINST, BrushObject);
if ((psurfPattern = SURFACE_LockSurface(GdiBrush->GdiBrushObject->hbmPattern)))
{
GdiBrush = CONTAINING_RECORD(Brush, GDIBRUSHINST, BrushObject);
if ((psurfPattern = SURFACE_LockSurface(GdiBrush->GdiBrushObject->hbmPattern)))
}
else if (ROP3_TO_ROP4(PATCOPY) == Rop4)
{
}
else if (ROP3_TO_ROP4(PATCOPY) == Rop4)
{
- if (Brush->iSolidColor == 0xFFFFFFFF)
+ if (Brush && Brush->iSolidColor == 0xFFFFFFFF)
BltRectFunc = CallDibBitBlt;
else
BltRectFunc = BltPatCopy;
BltRectFunc = CallDibBitBlt;
else
BltRectFunc = BltPatCopy;
- BrushColor = XLATEOBJ_iXlate(SrcColorTranslation, Brush->iSolidColor);
+ BrushColor = XLATEOBJ_iXlate(SrcColorTranslation, Brush ? Brush->iSolidColor : 0);
r = (int)GetRValue(BrushColor);
g = (int)GetGValue(BrushColor);
b = (int)GetBValue(BrushColor);
r = (int)GetRValue(BrushColor);
g = (int)GetGValue(BrushColor);
b = (int)GetBValue(BrushColor);
if (*lMask == 0xff)
{
DibFunctionsForBitmapFormat[psoDest->iBitmapFormat].DIB_PutPixel(
if (*lMask == 0xff)
{
DibFunctionsForBitmapFormat[psoDest->iBitmapFormat].DIB_PutPixel(
- psoDest, DestRect->left + i, DestRect->top + j, Brush->iSolidColor);
+ psoDest, DestRect->left + i, DestRect->top + j, Brush ? Brush->iSolidColor : 0);
+ Output(Out, "if (!BltInfo->Brush)\n");
+ Output(Out, "{\n");
+ Output(Out, "Pattern = 0;\n");
+ Output(Out, "}\n");
+ Output(Out, "else\n");
+ Output(Out, "{\n");
Output(Out, "Pattern = BltInfo->Brush->iSolidColor");
}
else
Output(Out, "Pattern = BltInfo->Brush->iSolidColor");
}
else
if (32 / Bpp <= Partial + 1)
{
Output(Out, ";\n");
if (32 / Bpp <= Partial + 1)
{
Output(Out, ";\n");