user32: Fix a DC leak in DrawIconEx.

This commit is contained in:
Alexandre Julliard 2010-10-12 21:51:37 +02:00
parent f75b7e8788
commit bb8590f6ce
1 changed files with 6 additions and 6 deletions

View File

@ -1880,18 +1880,18 @@ BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
hdc,x0,y0,hIcon,cxWidth,cyWidth,istep,hbr,flags );
if (!(ptr = get_icon_ptr( hIcon ))) return FALSE;
if (!(hMemDC = CreateCompatibleDC( hdc )))
{
release_icon_ptr( hIcon, ptr );
return FALSE;
}
if (istep >= ptr->num_frames)
{
TRACE_(icon)("Stepped past end of animated frames=%d\n", istep);
release_icon_ptr( hIcon, ptr );
return FALSE;
}
if (!(hMemDC = CreateCompatibleDC( hdc )))
{
release_icon_ptr( hIcon, ptr );
return FALSE;
}
if (flags & DI_NOMIRROR)
FIXME_(icon)("Ignoring flag DI_NOMIRROR\n");