mirror of
https://github.com/reactos/reactos.git
synced 2024-08-05 19:11:16 +00:00
[USER32]
- Fix bitmap leaks in STATIC_SetIcon and get_icon_size svn path=/trunk/; revision=53191
This commit is contained in:
parent
85e01470a4
commit
1b7607bcd9
|
@ -208,6 +208,9 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
|
||||||
SetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight,
|
SetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight,
|
||||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
|
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeleteObject(info.hbmMask);
|
||||||
|
if (info.hbmColor) DeleteObject(info.hbmColor);
|
||||||
}
|
}
|
||||||
return prevIcon;
|
return prevIcon;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2201,6 +2201,12 @@ BOOL get_icon_size(HICON hIcon, SIZE *size)
|
||||||
{
|
{
|
||||||
size->cy /= 2;
|
size->cy /= 2;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DeleteObject(info.hbmColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
DeleteObject(info.hbmMask);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue