diff --git a/dll/win32/shell32/COpenWithMenu.cpp b/dll/win32/shell32/COpenWithMenu.cpp index a7783eaf912..ecc9cc52b65 100644 --- a/dll/win32/shell32/COpenWithMenu.cpp +++ b/dll/win32/shell32/COpenWithMenu.cpp @@ -226,12 +226,23 @@ LPCWSTR COpenWithList::GetName(SApp *pApp) HICON COpenWithList::GetIcon(SApp *pApp) { + UINT nRes; if (!pApp->hIcon) { WCHAR wszPath[MAX_PATH]; GetPathFromCmd(wszPath, pApp->wszCmd); - ExtractIconExW(wszPath, 0, NULL, &pApp->hIcon, 1); + + nRes = ExtractIconExW(wszPath, 0, NULL, &pApp->hIcon, 1); + if ((nRes == 0) || (nRes == UINT_MAX)) + { + ERR("ExtractIconExW failed for %ls returned : %d\n",wszPath, nRes); + nRes = ExtractIconExW(L"shell32.dll", 0, NULL, &pApp->hIcon, 1); + if ((nRes == 0) || (nRes == UINT_MAX)) + { + ERR("ExtractIconExW backup failed for %ls returned : %d\n",wszPath, nRes); + } + } } TRACE("%ls icon: %p\n", pApp->wszFilename, pApp->hIcon);