mirror of
https://github.com/reactos/reactos.git
synced 2024-10-05 00:43:21 +00:00
- Don't leak bitmaps in the CopyIcon call.
- Pass the call on, don't call straight into win32k svn path=/trunk/; revision=31291
This commit is contained in:
parent
c5d666d363
commit
1e284d22a4
|
@ -35,6 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(user32);
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
|
||||||
HICON
|
HICON
|
||||||
ICON_CreateIconFromData(HDC hDC, PVOID ImageData, ICONIMAGE* IconImage, int cxDesired, int cyDesired, int xHotspot, int yHotspot)
|
ICON_CreateIconFromData(HDC hDC, PVOID ImageData, ICONIMAGE* IconImage, int cxDesired, int cyDesired, int xHotspot, int yHotspot)
|
||||||
{
|
{
|
||||||
|
@ -147,16 +148,19 @@ ICON_CreateCursorFromData(HDC hDC, PVOID ImageData, ICONIMAGE* IconImage, int cx
|
||||||
*/
|
*/
|
||||||
HICON
|
HICON
|
||||||
STDCALL
|
STDCALL
|
||||||
CopyIcon(
|
CopyIcon(HICON hIcon)
|
||||||
HICON hIcon)
|
|
||||||
{
|
{
|
||||||
ICONINFO IconInfo;
|
HICON hRetIcon = NULL;
|
||||||
|
ICONINFO IconInfo;
|
||||||
|
|
||||||
if(GetIconInfo((HANDLE)hIcon, &IconInfo))
|
if(GetIconInfo(hIcon, &IconInfo))
|
||||||
{
|
{
|
||||||
return NtUserCreateCursorIconHandle(&IconInfo, FALSE);
|
hRetIcon = CreateIconIndirect(&IconInfo);
|
||||||
}
|
DeleteObject(IconInfo.hbmColor);
|
||||||
return (HICON)0;
|
DeleteObject(IconInfo.hbmMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
return hRetIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue