mshtml: Set _retval in nsIDirectoryServiceProvider2 functions even when returning failure.

This commit is contained in:
Jacek Caban 2013-05-08 17:09:34 +02:00 committed by Alexandre Julliard
parent f649ee5997
commit 6f1c143ad5
1 changed files with 5 additions and 1 deletions

View File

@ -287,6 +287,7 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFile(nsIDirectoryServicePro
return nsIFile_Clone(profile_directory, _retval); return nsIFile_Clone(profile_directory, _retval);
} }
*_retval = NULL;
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }
@ -310,9 +311,11 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFiles(nsIDirectoryServicePr
strcpyW(plugin_path+len, gecko_pluginW); strcpyW(plugin_path+len, gecko_pluginW);
nsres = create_nsfile(plugin_path, &plugin_directory); nsres = create_nsfile(plugin_path, &plugin_directory);
if(NS_FAILED(nsres)) if(NS_FAILED(nsres)) {
*_retval = NULL;
return nsres; return nsres;
} }
}
nsres = nsIFile_Clone(plugin_directory, &file); nsres = nsIFile_Clone(plugin_directory, &file);
if(NS_FAILED(nsres)) if(NS_FAILED(nsres))
@ -326,6 +329,7 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFiles(nsIDirectoryServicePr
return NS_OK; return NS_OK;
} }
*_retval = NULL;
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }