Index: cards.c =================================================================== --- cards.c (revision 61992) +++ cards.c (working copy) @@ -166,19 +166,21 @@ return FALSE; } - if (type == ectEMPTY || type == ectERASE) - { - POINT pPoint; - HBRUSH hBrush; - - hBrush = CreateSolidBrush(color); - GetDCOrgEx(hdc, &pPoint); - SetBrushOrgEx(hdc, pPoint.x, pPoint.y, 0); - SelectObject(hdc, hBrush); - PatBlt(hdc, x, y, dx, dy, PATCOPY); - } - if (type != ectERASE) - { + if (type == ectEMPTY || type == ectERASE) + { + POINT pPoint; + HBRUSH hBrush, oldBrush; + + hBrush = CreateSolidBrush(color); + GetDCOrgEx(hdc, &pPoint); + SetBrushOrgEx(hdc, pPoint.x, pPoint.y, 0); + oldBrush = SelectObject(hdc, hBrush); + PatBlt(hdc, x, y, dx, dy, PATCOPY); + SelectObject(hdc, oldBrush); + DeleteObject(hBrush); + } + if (type != ectERASE) + { hdcCard = CreateCompatibleDC(hdc); SelectObject(hdcCard, g_CardBitmaps[card]); OldBkColor = SetBkColor(hdc, (type == ectFACES) ? 0xFFFFFF : color);