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; |