mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
- Don't delete icons that we got by WM_GETICON or GetClassIcon.
svn path=/trunk/; revision=9463
This commit is contained in:
parent
4c8d47cc6b
commit
1c1f4e3945
1 changed files with 6 additions and 1 deletions
|
@ -319,13 +319,18 @@ BOOL CALLBACK TaskBar::EnumWndProc(HWND hwnd, LPARAM lparam)
|
|||
} else {
|
||||
HBITMAP hbmp;
|
||||
HICON hIcon = get_window_icon_small(hwnd);
|
||||
BOOL delete_icon = FALSE;
|
||||
|
||||
if (!hIcon)
|
||||
{
|
||||
hIcon = LoadIcon(0, IDI_APPLICATION);
|
||||
delete_icon = TRUE;
|
||||
}
|
||||
|
||||
if (hIcon) {
|
||||
hbmp = create_bitmap_from_icon(hIcon, GetSysColorBrush(COLOR_BTNFACE), WindowCanvas(pThis->_htoolbar));
|
||||
DestroyIcon(hIcon); // some icons can be freed, some not - so ignore any error return of DestroyIcon()
|
||||
if (delete_icon)
|
||||
DestroyIcon(hIcon); // some icons can be freed, some not - so ignore any error return of DestroyIcon()
|
||||
} else
|
||||
hbmp = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue