Huw Davies : shell32: Don't try to check for the folder' s existence if we don't have a path.

Alexandre Julliard julliard at winehq.org
Wed Feb 8 17:45:29 CST 2012


Module: wine
Branch: master
Commit: 9ae17687c0654e89b702c4b7bc7a2e93f85321d4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9ae17687c0654e89b702c4b7bc7a2e93f85321d4

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Feb  8 16:52:17 2012 +0000

shell32: Don't try to check for the folder's existence if we don't have a path.

---

 dlls/shell32/shellpath.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index 8c66646..16ca6a3 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) )




More information about the wine-cvs mailing list