mirror of
https://github.com/reactos/reactos.git
synced 2024-09-29 05:54:05 +00:00
[UXTHEME] EnumThemes: Don't fail if a theme doesn't have a tooltip. CORE-13732
This commit is contained in:
parent
3dbd44fde1
commit
3a68bebf87
|
@ -1259,14 +1259,20 @@ HRESULT WINAPI EnumThemes(LPCWSTR pszThemePath, ENUMTHEMEPROC callback,
|
|||
wsprintfW(szPath, szFormat, szDir, wfd.cFileName, wfd.cFileName);
|
||||
|
||||
hr = GetThemeDocumentationProperty(szPath, szDisplayName, szName, sizeof(szName)/sizeof(szName[0]));
|
||||
if(SUCCEEDED(hr))
|
||||
hr = GetThemeDocumentationProperty(szPath, szTooltip, szTip, sizeof(szTip)/sizeof(szTip[0]));
|
||||
if(SUCCEEDED(hr)) {
|
||||
TRACE("callback(%s,%s,%s,%p)\n", debugstr_w(szPath), debugstr_w(szName), debugstr_w(szTip), lpData);
|
||||
if(!callback(NULL, szPath, szName, szTip, NULL, lpData)) {
|
||||
TRACE("callback ended enum\n");
|
||||
break;
|
||||
}
|
||||
if(FAILED(hr))
|
||||
{
|
||||
ERR("Failed to get theme name from %S\n", szPath);
|
||||
continue;
|
||||
}
|
||||
|
||||
hr = GetThemeDocumentationProperty(szPath, szTooltip, szTip, sizeof(szTip)/sizeof(szTip[0]));
|
||||
if (FAILED(hr))
|
||||
szTip[0] = 0;
|
||||
|
||||
TRACE("callback(%s,%s,%s,%p)\n", debugstr_w(szPath), debugstr_w(szName), debugstr_w(szTip), lpData);
|
||||
if(!callback(NULL, szPath, szName, szTip, NULL, lpData)) {
|
||||
TRACE("callback ended enum\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while(FindNextFileW(hFind, &wfd));
|
||||
|
|
Loading…
Reference in a new issue