https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c6c7fc11828dee205cdf6bf4fd350a7b53f96139

commit c6c7fc11828dee205cdf6bf4fd350a7b53f96139
Author:     Katayama Hirofumi MZ <katayama.hirofumi...@gmail.com>
AuthorDate: Wed Nov 8 19:53:02 2023 +0900
Commit:     GitHub <nore...@github.com>
CommitDate: Wed Nov 8 19:53:02 2023 +0900

    [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));

Reply via email to