bug 8801; better error handling for new font enumerator; r=ftang

git-svn-id: svn://10.0.0.236/trunk@54220 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
erik%netscape.com
1999-11-23 00:12:36 +00:00
parent f040981a26
commit 8fee3c22cb

View File

@@ -2708,7 +2708,16 @@ CompareFontNames(const void* aArg1, const void* aArg2, void* aClosure)
NS_IMETHODIMP
nsFontEnumeratorWin::EnumerateAllFonts(PRUint32* aCount, PRUnichar*** aResult)
{
if ((!aCount) || (!aResult)) {
if (aCount) {
*aCount = 0;
}
else {
return NS_ERROR_NULL_POINTER;
}
if (aResult) {
*aResult = nsnull;
}
else {
return NS_ERROR_NULL_POINTER;
}
@@ -2831,7 +2840,19 @@ NS_IMETHODIMP
nsFontEnumeratorWin::EnumerateFonts(const char* aLangGroup,
const char* aGeneric, PRUint32* aCount, PRUnichar*** aResult)
{
if ((!aLangGroup) || (!aGeneric) || (!aCount) || (!aResult)) {
if ((!aLangGroup) || (!aGeneric)) {
return NS_ERROR_NULL_POINTER;
}
if (aCount) {
*aCount = 0;
}
else {
return NS_ERROR_NULL_POINTER;
}
if (aResult) {
*aResult = nsnull;
}
else {
return NS_ERROR_NULL_POINTER;
}