winemenubuilder: Avoid passing a null pointer (or a non-pointer) to extract_icon in InvokeShellLinkerForURL.

This commit is contained in:
Andrew Bogott 2011-01-09 11:02:54 -05:00 committed by Alexandre Julliard
parent 5205d03800
commit a901983fe3
1 changed files with 5 additions and 2 deletions

View File

@ -2752,9 +2752,12 @@ static BOOL InvokeShellLinkerForURL( IUniformResourceLocatorW *url, LPCWSTR link
hr = IPropertyStorage_ReadMultiple(pPropStg, 2, ps, pv); hr = IPropertyStorage_ReadMultiple(pPropStg, 2, ps, pv);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
icon_name = extract_icon( pv[0].u.pwszVal, pv[1].u.iVal, NULL, bWait ); if (pv[0].vt == VT_LPWSTR && pv[0].u.pwszVal)
{
icon_name = extract_icon( pv[0].u.pwszVal, pv[1].u.iVal, NULL, bWait );
WINE_TRACE("URL icon path: %s icon index: %d icon name: %s\n", wine_dbgstr_w(pv[0].u.pwszVal), pv[1].u.iVal, icon_name); WINE_TRACE("URL icon path: %s icon index: %d icon name: %s\n", wine_dbgstr_w(pv[0].u.pwszVal), pv[1].u.iVal, icon_name);
}
PropVariantClear(&pv[0]); PropVariantClear(&pv[0]);
PropVariantClear(&pv[1]); PropVariantClear(&pv[1]);
} }