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

user32: Release the icon frame in CopyImage.

parent 6161571a
......@@ -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 );
......
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