Alexandre Julliard : user32: Fix a DC leak in DrawIconEx.
Alexandre Julliard
julliard at winehq.org
Wed Oct 13 11:43:05 CDT 2010
Module: wine
Branch: master
Commit: bb8590f6ce0be06df712653c3222ba97efcbbd6d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bb8590f6ce0be06df712653c3222ba97efcbbd6d
Author: Alexandre Julliard <julliard at 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");
More information about the wine-cvs
mailing list