LeOSium_old/patches/0001-Vanadium/0095-Add-missing-null-check...

26 lines
1.0 KiB
Diff
Raw Permalink Normal View History

2023-11-18 11:23:04 +01:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: fgei <fgei@gmail.com>
Date: Mon, 20 Feb 2023 07:06:53 +0000
Subject: [PATCH] Add missing null check for password manager autofill
---
.../autofill/content/renderer/password_autofill_agent.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
index 82d26af673fa8..f1877135d198a 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -778,7 +778,10 @@ void PasswordAutofillAgent::UpdateStateForTextChange(
void PasswordAutofillAgent::TrackAutofilledElement(
const blink::WebFormControlElement& element) {
- autofill_agent_->TrackAutofilledElement(element);
+ AutofillAgent* agent = autofill_agent_.get();
+ if (agent) {
+ agent->TrackAutofilledElement(element);
+ }
}
bool PasswordAutofillAgent::FillSuggestion(