summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/credit_card.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autofill/credit_card.cc')
-rw-r--r--chrome/browser/autofill/credit_card.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/autofill/credit_card.cc b/chrome/browser/autofill/credit_card.cc
index b85e538..1cd0c13 100644
--- a/chrome/browser/autofill/credit_card.cc
+++ b/chrome/browser/autofill/credit_card.cc
@@ -375,6 +375,9 @@ string16 CreditCard::LastFourDigits() const {
}
void CreditCard::operator=(const CreditCard& credit_card) {
+ if (this == &credit_card)
+ return;
+
number_ = credit_card.number_;
name_on_card_ = credit_card.name_on_card_;
type_ = credit_card.type_;