зеркало из https://github.com/mozilla/pjs.git
Null check current doc before using it. b=344787 r+sr=bzbarsky
This commit is contained in:
Родитель
6b35efb0e5
Коммит
09c15a3ac7
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче