fixed GlobalFree call with a bad pointer (thanks Takhir)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3920 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2005-03-11 11:28:58 +00:00
parent 2b53221b64
commit 5ef483cf7b
2 changed files with 2 additions and 1 deletions

View file

@ -76,6 +76,7 @@ void SetTransparentRegion(HWND myWnd)
BITMAPINFO bmi;
int size = bm.bmWidth * bm.bmHeight * 4;
int *bmp = GlobalAlloc(GPTR, size);
int *bmp_orig = bmp;
bmi.bmiHeader.biBitCount = 32;
bmi.bmiHeader.biCompression = BI_RGB;
bmi.bmiHeader.biHeight = bm.bmHeight;
@ -115,7 +116,7 @@ void SetTransparentRegion(HWND myWnd)
SetWindowRgn(myWnd, region, TRUE);
DeleteObject(region);
DeleteObject(dc);
GlobalFree(bmp);
GlobalFree(bmp_orig);
}
BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call,

Binary file not shown.