Module: wine Branch: stable Commit: 12c4533de370c8dfbac89d393652c4dee3f5a006 URL: http://source.winehq.org/git/wine.git/?a=commit;h=12c4533de370c8dfbac89d3936...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Oct 12 21:51:37 2010 +0200
user32: Fix a DC leak in DrawIconEx. (cherry picked from commit bb8590f6ce0be06df712653c3222ba97efcbbd6d)
---
dlls/user32/cursoricon.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 42bba6d..22464b7 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -2042,18 +2042,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 ))) + if (istep >= ptr->num_frames) { + TRACE_(icon)("Stepped past end of animated frames=%d\n", istep); release_icon_ptr( hIcon, ptr ); return FALSE; } - - if (istep >= ptr->num_frames) + if (!(hMemDC = CreateCompatibleDC( hdc ))) { - TRACE_(icon)("Stepped past end of animated frames=%d\n", istep); release_icon_ptr( hIcon, ptr ); return FALSE; } + if (flags & DI_NOMIRROR) FIXME_(icon)("Ignoring flag DI_NOMIRROR\n");