mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Null check current doc before using it. b=344787 r+sr=bzbarsky
This commit is contained in:
parent
906e7b0515
commit
5ddc7604b1
@ -932,11 +932,7 @@ nsHTMLFormElement::SubmitSubmission(nsIFormSubmission* aFormSubmission)
|
||||
|
||||
// If there is no link handler, then we won't actually be able to submit.
|
||||
nsIDocument* doc = GetCurrentDoc();
|
||||
if (!doc) {
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
nsCOMPtr<nsISupports> container = doc->GetContainer();
|
||||
nsCOMPtr<nsISupports> container = doc ? doc->GetContainer() : nsnull;
|
||||
nsCOMPtr<nsILinkHandler> linkHandler(do_QueryInterface(container));
|
||||
if (!linkHandler) {
|
||||
mIsSubmitting = PR_FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user