mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
fix resource leaks
svn path=/trunk/; revision=36347
This commit is contained in:
parent
b20ceda590
commit
de2b706b27
1 changed files with 6 additions and 1 deletions
|
@ -184,7 +184,8 @@ void Draw(HDC aDc)
|
|||
GetClientRect(hMainWnd, &appRect);
|
||||
GetWindowRect(hDesktopWindow, &R);
|
||||
|
||||
memset(&cinfo, 0, sizeof(cinfo));
|
||||
ZeroMemory(&cinfo, sizeof(CURSORINFO));
|
||||
ZeroMemory(&iinfo, sizeof(ICONINFO));
|
||||
cinfo.cbSize = sizeof(cinfo);
|
||||
GetCursorInfo(&cinfo);
|
||||
GetIconInfo(cinfo.hCursor, &iinfo);
|
||||
|
@ -272,6 +273,10 @@ void Draw(HDC aDc)
|
|||
rop);
|
||||
|
||||
/* Cleanup.*/
|
||||
if (iinfo.hbmMask)
|
||||
DeleteObject(iinfo.hbmMask);
|
||||
if (iinfo.hbmColor)
|
||||
DeleteObject(iinfo.hbmColor);
|
||||
SelectObject (HdcStrech, hOld);
|
||||
DeleteObject (HbmpStrech);
|
||||
DeleteDC (HdcStrech);
|
||||
|
|
Loading…
Reference in a new issue