Bug 2234: Crash on JS Submit().

This commit is contained in:
pollmann@netscape.com
1999-01-12 23:11:26 +00:00
parent 1025679708
commit 80f6a21014
3 changed files with 12 additions and 1 deletions

View File

@@ -621,6 +621,9 @@ PRBool
nsFormControlFrame::IsSuccessful(nsIFormControlFrame* aSubmitter)
{
nsAutoString name;
// Since JS Submit() calls are not linked to an element, aSubmitter is null.
// Return success to allow the call to go through.
if (aSubmitter == nsnull) return PR_TRUE;
return (NS_CONTENT_ATTR_HAS_VALUE == GetName(&name));
}