From c6c7fc11828dee205cdf6bf4fd350a7b53f96139 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Wed, 8 Nov 2023 19:53:02 +0900 Subject: [PATCH] [RAPPS] Fix item icons (#5896) Based on KRosUser's rapps_v2.patch. ExtractIconW can return (HICON)1. We check this invalid value. CORE-19317 --- base/applications/rapps/appview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/applications/rapps/appview.cpp b/base/applications/rapps/appview.cpp index cfe2683ec13..004e1623c3c 100644 --- a/base/applications/rapps/appview.cpp +++ b/base/applications/rapps/appview.cpp @@ -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));