Commit efa52619 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

user32: Delete info.hbmColor and hbmMask after copying.

parent 7ec5a7e1
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment