Index: components/autofill/core/browser/autofill_address_util.cc |
diff --git a/components/autofill/core/browser/autofill_address_util.cc b/components/autofill/core/browser/autofill_address_util.cc |
index e0e9b284e94fd18e3ad8c3f1bc9662839209c3a2..c232e0026513379e93b646177282b74d02c7b41f 100644 |
--- a/components/autofill/core/browser/autofill_address_util.cc |
+++ b/components/autofill/core/browser/autofill_address_util.cc |
@@ -76,6 +76,8 @@ void GetAddressComponents(const std::string& country_code, |
components[i].length_hint == AddressUiComponent::HINT_LONG) { |
line = new base::ListValue; |
address_components->Append(base::WrapUnique(line)); |
+ // |line| is invalidated at this point, so it needs to be reset. |
+ address_components->GetList(address_components->GetSize() - 1, &line); |
} |
std::unique_ptr<base::DictionaryValue> component(new base::DictionaryValue); |