Stefan Dösinger : user32: Delete info.hbmColor and hbmMask after copying.
Alexandre Julliard
julliard at winehq.org
Thu Jun 10 16:04:51 CDT 2021
Module: wine
Branch: master
Commit: efa52619af448cd1c30a2fc8b872030c6adcf25e
URL: https://source.winehq.org/git/wine.git/?a=commit;h=efa52619af448cd1c30a2fc8b872030c6adcf25e
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Thu Jun 10 16:12:20 2021 +0200
user32: Delete info.hbmColor and hbmMask after copying.
Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/cursoricon.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index f820c10a0d8..7ad0a04a551 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -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;
}
More information about the wine-cvs
mailing list