Put in check for null a mOptions and return zero for GetLength

This commit is contained in:
rods%netscape.com 1999-08-26 14:48:59 +00:00
parent a70b8597f5
commit a680982ab4
2 changed files with 6 additions and 4 deletions

View File

@ -407,9 +407,10 @@ nsHTMLSelectElement::GetLength(PRUint32* aLength)
{
if (nsnull != mOptions) {
Init();
return mOptions->GetLength(aLength);
}
return mOptions->GetLength(aLength);
*aLength = 0;
return NS_ERROR_FAILURE;
}
static PRBool

View File

@ -407,9 +407,10 @@ nsHTMLSelectElement::GetLength(PRUint32* aLength)
{
if (nsnull != mOptions) {
Init();
return mOptions->GetLength(aLength);
}
return mOptions->GetLength(aLength);
*aLength = 0;
return NS_ERROR_FAILURE;
}
static PRBool