Call NS_IF_RELEASE instead of NS_RELEASE for handler, because it could be NULL.

Fixes crash that occurs when pressing the submit button in a for displayed in
the editor.
This commit is contained in:
kin%netscape.com 1999-07-14 18:33:24 +00:00
parent 87c8fd62cb
commit 7a1d6040f4

View File

@ -568,7 +568,7 @@ nsFormFrame::OnSubmit(nsIPresContext* aPresContext, nsIFrame* aFrame)
if (handler)
handler->OnLinkClick(mContent, eLinkVerb_Replace, absURLSpec.GetUnicode(), target.GetUnicode(), postData);
NS_IF_RELEASE(postData);
NS_RELEASE(handler);
NS_IF_RELEASE(handler);
DebugPrint("url", absURLSpec);
DebugPrint("data", data);