fix resource leaks

svn path=/trunk/; revision=36347
This commit is contained in:
Christoph von Wittich 2008-09-20 13:44:56 +00:00
parent b20ceda590
commit de2b706b27

View file

@ -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);