Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc

Issue 12226125: temporary fix for requestAutocomplete crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
index a6e86b0eb50205c046e923bc317f1332f698bbdb..131b8257365c9c9ef81ba2194e0d8385a6157c9b 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
@@ -390,6 +390,8 @@ gfx::Image AutofillDialogControllerImpl::SuggestionIconForSection(
std::string item_key =
suggested_cc_.GetItemKeyAt(suggested_cc_.checked_item());
+ if (item_key.empty())
+ return gfx::Image();
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
CreditCard* card = GetManager()->GetCreditCardByGUID(item_key);
return rb.GetImageNamed(card->IconResourceId());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698