Alexandre Julliard : user32: Load the default app icon with LR_SHARED to avoid a leak.

Alexandre Julliard julliard at wine.codeweavers.com
Thu May 19 10:32:07 CDT 2016


Module: wine
Branch: master
Commit: c007b3cd4612e9c1b9e2990819415486f59a6acc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c007b3cd4612e9c1b9e2990819415486f59a6acc

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu May 19 16:38:34 2016 +0900

user32: Load the default app icon with LR_SHARED to avoid a leak.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/nonclient.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c
index 68320af..d3598b1 100644
--- a/dlls/user32/nonclient.c
+++ b/dlls/user32/nonclient.c
@@ -173,7 +173,7 @@ static HICON NC_IconForWindow( HWND hwnd )
      */
     if (!hIcon && !(GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_DLGMODALFRAME))
         hIcon = LoadImageW(0, (LPCWSTR)IDI_WINLOGO, IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
-                           GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
+                           GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR | LR_SHARED);
     return hIcon;
 }
 




More information about the wine-cvs mailing list