}
}
+ /* The code currently assumes there will be a source bitmap. This is not true when, for example, using this function to
+ * paint a brush pattern on the destination. */
+ if(!Source)
+ {
+ DbgPrint("EngBitBlt: A source is currently required, even though not all operations require one (FIXME)\n");
+ return FALSE;
+ }
+
// * The source bitmap is not managed by the GDI and we didn't already obtain it using EngCopyBits from the device
if(Source->iType != STYPE_BITMAP && SourceGDI->CopyBits == NULL)
{
RectBounds, // Bounding rectangle
dc->w.ROPmode); // MIX */
+ // FIXME: BrushObj is obtained above; decide which one is correct
BrushObj = (BRUSHOBJ*) GDIOBJ_LockObj(dc->w.hBrush, GO_BRUSH_MAGIC);
- assert(BrushObj);
- if (BrushObj->logbrush.lbStyle != BS_NULL)
- {
- DestRect.left = LeftRect + 1;
- DestRect.right = RightRect - 1;
- DestRect.top = TopRect + 1;
- DestRect.bottom = BottomRect - 1;
- ret = EngBitBlt(SurfObj,
- NULL,
- NULL,
- NULL,
- NULL,
- &DestRect,
- NULL,
- NULL,
- BrushObj,
- NULL,
- PATCOPY);
- }
+
+ if (BrushObj)
+ {
+ if (BrushObj->logbrush.lbStyle != BS_NULL)
+ {
+ DestRect.left = LeftRect + 1;
+ DestRect.right = RightRect - 1;
+ DestRect.top = TopRect + 1;
+ DestRect.bottom = BottomRect - 1;
+ ret = EngBitBlt(SurfObj,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &DestRect,
+ NULL,
+ NULL,
+ BrushObj,
+ NULL,
+ PATCOPY);
+ }
+ }
GDIOBJ_UnlockObj( dc->w.hBrush, GO_PEN_MAGIC );
}