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

Unified Diff: chrome/browser/ui/views/content_setting_bubble_contents.cc

Issue 2130913002: Avoid NOTREACHED in content settings bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/views/content_setting_bubble_contents.cc
diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.cc b/chrome/browser/ui/views/content_setting_bubble_contents.cc
index a24101ee4598433ad3e0e96ff32484a43b9fa6f1..0ed18bd5296d27a26212ac106eb55f49ae2bff47 100644
--- a/chrome/browser/ui/views/content_setting_bubble_contents.cc
+++ b/chrome/browser/ui/views/content_setting_bubble_contents.cc
@@ -324,7 +324,9 @@ void ContentSettingBubbleContents::Init() {
!(i->second.disabled || model->GetDevices().empty()));
combobox->set_listener(this);
combobox->SetSelectedIndex(
- model->GetDeviceIndex(i->second.selected_device));
+ model->GetDevices().empty()
+ ? 0
+ : model->GetDeviceIndex(i->second.selected_device));
layout->AddView(combobox);
bubble_content_empty = false;
« 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