From 1e6abd3457a460a4a34b2b70a8822c7582f20325 Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 11 Jan 2003 21:29:55 +0000 Subject: [PATCH] Delete the old brush if setting the brush twice git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2059 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/exec.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index 791068cc..9aa97897 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -763,10 +763,12 @@ static int NSISCALL ExecuteEntry(entry *entry_) ); return 0; case EW_SETSTATICBKCOLOR: - SetWindowLong( - (HWND)process_string_fromparm_toint(0), - GWL_USERDATA, - (LONG)CreateSolidBrush(parm1) + DeleteObject( + (HGDIOBJ)SetWindowLong( + (HWND)process_string_fromparm_toint(0), + GWL_USERDATA, + (LONG)CreateSolidBrush(parm1) + ) ); return 0; case EW_SETBRANDINGIMAGE: