Since LoadIconW returns NULL on an error anyway, we should try LoadIconW. This fixes a crash with the Affinity V2 installers.
-- v10: shell32: make SHGetStockIconInfo() attempt to set hIcon.
From: Kieran Geary kieran.r.geary@gmail.com
--- dlls/shell32/iconcache.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c index c122c145609..8f9519d2ca8 100644 --- a/dlls/shell32/iconcache.c +++ b/dlls/shell32/iconcache.c @@ -1008,6 +1008,8 @@ HRESULT WINAPI SHGetStockIconInfo(SHSTOCKICONID id, UINT flags, SHSTOCKICONINFO FIXME("flags 0x%x not implemented\n", flags);
sii->hIcon = NULL; + if (flags & SHGSI_ICON) + sii->hIcon = LoadIconW(GetModuleHandleW(sii->szPath), MAKEINTRESOURCEW(sii->iIcon)); sii->iSysImageIndex = -1;
TRACE("%3d: returning %s (%d)\n", id, debugstr_w(sii->szPath), sii->iIcon);