Bug 1808177 - mPointToInsert.GetContainer() in BlobReader::OnError could be nullptr. r=masayuki

Differential Revision: https://phabricator.services.mozilla.com/D165858
This commit is contained in:
Tom Schuster 2023-01-04 12:46:27 +00:00
parent 828e710e23
commit 9cf9360385

View File

@ -1723,10 +1723,9 @@ nsresult HTMLEditor::BlobReader::OnResult(const nsACString& aResult) {
nsresult HTMLEditor::BlobReader::OnError(const nsAString& aError) {
AutoTArray<nsString, 1> error;
error.AppendElement(aError);
nsContentUtils::ReportToConsole(nsIScriptError::warningFlag, "Editor"_ns,
mPointToInsert.GetContainer()->OwnerDoc(),
nsContentUtils::eDOM_PROPERTIES,
"EditorFileDropFailed", error);
nsContentUtils::ReportToConsole(
nsIScriptError::warningFlag, "Editor"_ns, mHTMLEditor->GetDocument(),
nsContentUtils::eDOM_PROPERTIES, "EditorFileDropFailed", error);
return NS_OK;
}