Fixed icon leak.
authorOve Kaaven <ovek@arcticnet.no>
Fri, 27 Feb 2004 21:30:16 +0000 (21:30 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 27 Feb 2004 21:30:16 +0000 (21:30 +0000)
dlls/shell32/systray.c

index 9c6a81ecbda16fa5d1d652b8cdd9e37b57e25566..55d0403883e435e4115babee2d0ab3800b0468c9 100644 (file)
@@ -246,6 +246,8 @@ void SYSTRAY_ItemSetMessage(SystrayItem *ptrayItem, UINT uCallbackMessage)
 
 void SYSTRAY_ItemSetIcon(SystrayItem *ptrayItem, HICON hIcon)
 {
+  if(ptrayItem->notifyIcon.hIcon)
+    DestroyIcon(ptrayItem->notifyIcon.hIcon);
   ptrayItem->notifyIcon.hIcon = CopyIcon(hIcon);
   InvalidateRect(ptrayItem->hWnd, NULL, TRUE);
 }