From 9ae17687c0654e89b702c4b7bc7a2e93f85321d4 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Wed, 8 Feb 2012 16:52:17 +0000 Subject: [PATCH] shell32: Don't try to check for the folder's existence if we don't have a path. --- dlls/shell32/shellpath.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 8c66646596d..16ca6a388c5 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -3544,6 +3544,8 @@ static HRESULT get_known_folder_path_by_id( else hr = SHGetKnownFolderPath( folderId, dwFlags, NULL, ppszPath ); + if (FAILED(hr)) return hr; + /* check if known folder really exists */ dwAttributes = GetFileAttributesW(*ppszPath); if(dwAttributes == INVALID_FILE_ATTRIBUTES || !(dwAttributes & FILE_ATTRIBUTE_DIRECTORY) )