Fix Excel 2010 crashing in get_display_name() when clicking the ribbon bar file tab. The check was removed in 984f608.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/shell32/shfldr_fs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c index 64571200493..214b9326342 100644 --- a/dlls/shell32/shfldr_fs.c +++ b/dlls/shell32/shfldr_fs.c @@ -867,8 +867,9 @@ IShellFolder_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) && (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER)) { - get_display_name( pszPath, This->sPathTarget, pidl, - IsEqualCLSID( This->pclsid, &CLSID_UnixFolder )); + if (This->sPathTarget) + get_display_name( pszPath, This->sPathTarget, pidl, + IsEqualCLSID( This->pclsid, &CLSID_UnixFolder )); } else { /* pidl has to contain exactly one non null SHITEMID */ hr = E_INVALIDARG;