Fix HDC leak in CreateFont
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6275 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
ae879b7c0a
commit
bd2afdb1f3
1 changed files with 3 additions and 1 deletions
|
@ -832,7 +832,9 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
|||
case EW_CREATEFONT:
|
||||
{
|
||||
static LOGFONT f;
|
||||
f.lfHeight=-MulDiv(GetIntFromParm(2),GetDeviceCaps(GetDC(g_hwnd),LOGPIXELSY),72);
|
||||
const HDC hdc=GetDC(g_hwnd);
|
||||
f.lfHeight=-MulDiv(GetIntFromParm(2),GetDeviceCaps(hdc,LOGPIXELSY),72);
|
||||
ReleaseDC(g_hwnd,hdc);
|
||||
f.lfWeight=GetIntFromParm(3);
|
||||
f.lfItalic=parm4&1;
|
||||
f.lfUnderline=parm4&2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue