Bug 1652699 - Fix a null pointer crash while doing dialog form submission r=smaug
It's possible that the dialog is closed while we are processing the request, and we'd deferencing a null pointer for such case. Differential Revision: https://phabricator.services.mozilla.com/D83531
This commit is contained in:
@@ -830,7 +830,7 @@ nsresult HTMLFormSubmission::GetFromForm(HTMLFormElement* aForm,
|
||||
// If there isn't one, or if it does not have an open attribute, do
|
||||
// nothing.
|
||||
if (!dialog || !dialog->Open()) {
|
||||
return NS_OK;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsAutoString result;
|
||||
|
||||
Reference in New Issue
Block a user