Add null check to params in nsStringBundle::GetStringFromName() and nsStringBundle::FormatStringFromName(). Bug 268832, r=jshin, sr=neil.

This commit is contained in:
smontagu%smontagu.org 2004-11-10 21:36:38 +00:00
parent c37ce6b8bb
commit 3837ec61c8

View File

@ -221,6 +221,10 @@ nsStringBundle::FormatStringFromName(const PRUnichar *aName,
PRUint32 aLength,
PRUnichar **aResult)
{
NS_ENSURE_ARG_POINTER(aName);
NS_ENSURE_ARG_POINTER(aParams);
NS_ENSURE_ARG_POINTER(aResult);
nsresult rv;
rv = LoadProperties();
if (NS_FAILED(rv)) return rv;
@ -257,6 +261,9 @@ nsStringBundle::GetStringFromID(PRInt32 aID, PRUnichar **aResult)
NS_IMETHODIMP
nsStringBundle::GetStringFromName(const PRUnichar *aName, PRUnichar **aResult)
{
NS_ENSURE_ARG_POINTER(aName);
NS_ENSURE_ARG_POINTER(aResult);
nsresult rv;
rv = LoadProperties();
if (NS_FAILED(rv)) return rv;