Fixed a memory leak.

This commit is contained in:
Francis Beaudet 1999-07-30 18:06:04 +00:00 committed by Alexandre Julliard
parent 4d550350f3
commit 66a44e3c1f
1 changed files with 8 additions and 0 deletions

View File

@ -798,7 +798,10 @@ static void TAB_DrawItem(
* Background color.
*/
if (!(lStyle & TCS_OWNERDRAWFIXED))
{
DeleteObject(hbr);
hbr = CreateSolidBrush(GetSysColor(COLOR_3DHILIGHT));
}
/*
* Erase the background.
@ -847,6 +850,7 @@ static void TAB_DrawItem(
/*
* Background color.
*/
DeleteObject(hbr);
hbr = CreateSolidBrush(GetSysColor(COLOR_BTNFACE));
/*
@ -961,6 +965,8 @@ static void TAB_DrawItem(
*/
SetBkMode(hdc, oldBkMode);
SelectObject(hdc, holdPen);
DeleteObject(hfocusPen);
DeleteObject(hbr);
}
}
@ -1097,6 +1103,8 @@ static LRESULT TAB_EraseBackground(
if (givenDC==0)
ReleaseDC(hwnd, hdc);
DeleteObject(brush);
return 0;
}