From 05c8e399a64e2a99bc83c85344c9a3a900f26294 Mon Sep 17 00:00:00 2001 From: "bsmedberg%covad.net" Date: Thu, 12 Jan 2006 17:16:15 +0000 Subject: [PATCH] Bustage from bug 321359 - check for success before falling through to GetProfileDir --- toolkit/xre/nsXREDirProvider.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp index 6239b0de210..3d56c84a28b 100644 --- a/toolkit/xre/nsXREDirProvider.cpp +++ b/toolkit/xre/nsXREDirProvider.cpp @@ -324,6 +324,11 @@ nsXREDirProvider::GetFile(const char* aProperty, PRBool* aPersistent, } } + if (NS_SUCCEEDED(rv) && file) { + NS_ADDREF(*aFile = file); + return NS_OK; + } + if (NS_SUCCEEDED(GetProfileDir(getter_AddRefs(file)))) { if (!strcmp(aProperty, NS_APP_PREFS_50_DIR)) { rv = NS_OK;