[RAPPS] Fix item icons (#5896)

Based on KRosUser's rapps_v2.patch.
ExtractIconW can return (HICON)1.
We check this invalid value.
CORE-19317
This commit is contained in:
Katayama Hirofumi MZ 2023-11-08 19:53:02 +09:00 committed by GitHub
parent 97bf53eeb8
commit c6c7fc1182
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1299,7 +1299,8 @@ CAppsListView::AddApplication(CAppInfo *AppInfo, BOOL InitialCheckState)
hIcon = ExtractIconW(hInst, szIconPath.GetString(), 0);
}
if (!hIcon)
/* Use the default icon if none were found in the file, or if it is not supported (returned 1) */
if (!hIcon || (hIcon == (HICON)1))
{
/* Load default icon */
hIcon = LoadIconW(hInst, MAKEINTRESOURCEW(IDI_MAIN));