From c8a1178505fe181733b68762b661adc76d07aa54 Mon Sep 17 00:00:00 2001 From: Piotr Piastucki Date: Mon, 18 May 2015 12:12:04 +0000 Subject: Neither brushes returned by WM_CTLCOLORDLG nor stock brushes need to be deleted (and cannot be as they are still in use) git-svn-id: http://svn.miranda-ng.org/main/trunk@13678 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/button/button.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/modules/button/button.cpp b/src/modules/button/button.cpp index 0df5c21806..483c85b0b4 100644 --- a/src/modules/button/button.cpp +++ b/src/modules/button/button.cpp @@ -129,10 +129,8 @@ static void PaintWorker(MButtonCtrl *ctl, HDC hdcPaint) SelectObject(dc, oldBrush); ReleaseDC(hwndParent, dc); } - if (hbr) { + if (hbr) FillRect(hdcMem, &rcClient, hbr); - DeleteObject(hbr); - } if (ctl->stateId == PBS_HOT || ctl->focus) { if (ctl->bIsPushed) DrawEdge(hdcMem, &rcClient, EDGE_ETCHED, BF_RECT|BF_SOFT); -- cgit v1.2.3