Module: wine Branch: master Commit: bb8590f6ce0be06df712653c3222ba97efcbbd6d URL: http://source.winehq.org/git/wine.git/?a=commit;h=bb8590f6ce0be06df712653c32...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Oct 12 21:51:37 2010 +0200
user32: Fix a DC leak in DrawIconEx.
---
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 d2219d2..1d440db 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -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 ))) + 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");