| 2294 | |
| 2295 | |
| 2296 | void GuiType::DestroyIconsIfUnused(HICON ahIcon, HICON ahIconSmall) |
| 2297 | // Caller has ensured that the GUI window previously using ahIcon has been destroyed prior to calling |
| 2298 | // this function. |
| 2299 | { |
| 2300 | if (!ahIcon) // At least one caller relies on this check. |
| 2301 | return; |
| 2302 | for (GuiType* gui = g_firstGui; gui; gui = gui->mNextGui) |
| 2303 | { |
| 2304 | // If another window is using this icon, don't destroy the because that has been reported to disrupt |
| 2305 | // the window's display of the icon in some cases (apparently WM_SETICON doesn't make a copy of the |
| 2306 | // icon). The windows still using the icon will be responsible for destroying it later. |
| 2307 | if (gui->mIconEligibleForDestruction == ahIcon) |
| 2308 | return; |
| 2309 | } |
| 2310 | // Since above didn't return, this icon is not currently in use by a GUI window. The caller has |
| 2311 | // authorized us to destroy it. |
| 2312 | DestroyIcon(ahIcon); |
| 2313 | // L17: Small icon should always also be unused at this point. |
| 2314 | if (ahIconSmall != ahIcon) |
| 2315 | DestroyIcon(ahIconSmall); |
| 2316 | } |
| 2317 | |
| 2318 | |
| 2319 |
nothing calls this directly
no outgoing calls
no test coverage detected