user32: Delete info.hbmColor and hbmMask after copying.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7ec5a7e1b6
commit
efa52619af
|
@ -1670,12 +1670,16 @@ HICON WINAPI CreateIcon( HINSTANCE instance, int width, int height, BYTE planes,
|
|||
HICON WINAPI CopyIcon( HICON icon )
|
||||
{
|
||||
ICONINFOEXW info;
|
||||
HICON res;
|
||||
|
||||
info.cbSize = sizeof(info);
|
||||
if (!GetIconInfoExW( icon, &info ))
|
||||
return NULL;
|
||||
|
||||
return CopyImage( icon, info.fIcon ? IMAGE_ICON : IMAGE_CURSOR, 0, 0, 0 );
|
||||
res = CopyImage( icon, info.fIcon ? IMAGE_ICON : IMAGE_CURSOR, 0, 0, 0 );
|
||||
DeleteObject( info.hbmColor );
|
||||
DeleteObject( info.hbmMask );
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue