shell32: Properly handle SHGetPathFromIDListW failure (PVS-Studio).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2015-10-20 16:44:49 +03:00 committed by Alexandre Julliard
parent b2855505b9
commit 186bed3d16
1 changed files with 3 additions and 2 deletions

View File

@ -757,9 +757,10 @@ static HRESULT BrsFolder_NewFolder(browse_info *info)
if(FAILED(hr))
return hr;
hr = SHGetPathFromIDListW(info->pidlRet, name);
if(FAILED(hr))
if(!SHGetPathFromIDListW(info->pidlRet, name)) {
hr = E_FAIL;
goto cleanup;
}
len = strlenW(name);
if(len<MAX_PATH)