Stefan Dösinger : user32: Release the icon frame in CopyImage.
Alexandre Julliard
julliard at winehq.org
Thu Jun 10 16:04:51 CDT 2021
Module: wine
Branch: master
Commit: 7ec5a7e1b642cfc5d2adc25b1c1ded21f1dde872
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7ec5a7e1b642cfc5d2adc25b1c1ded21f1dde872
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Thu Jun 10 16:12:19 2021 +0200
user32: Release the icon frame in CopyImage.
Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/cursoricon.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index a225303f80f..f820c10a0d8 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -3000,6 +3000,7 @@ HANDLE WINAPI CopyImage( HANDLE hnd, UINT type, INT desiredx,
{
if (!(info.hbmColor = create_color_bitmap( desiredx, desiredy )))
{
+ release_icon_frame( icon, frame );
release_user_handle_ptr( icon );
return 0;
}
@@ -3009,6 +3010,7 @@ HANDLE WINAPI CopyImage( HANDLE hnd, UINT type, INT desiredx,
if (!(info.hbmMask = CreateBitmap( desiredx, desiredy, 1, 1, NULL )))
{
DeleteObject( info.hbmColor );
+ release_icon_frame( icon, frame );
release_user_handle_ptr( icon );
return 0;
}
@@ -3034,6 +3036,7 @@ HANDLE WINAPI CopyImage( HANDLE hnd, UINT type, INT desiredx,
DeleteObject( info.hbmMask );
}
+ release_icon_frame( icon, frame );
release_user_handle_ptr( icon );
if (res && (flags & LR_COPYDELETEORG)) DeleteObject( hnd );
More information about the wine-cvs
mailing list