diff options
Diffstat (limited to 'ash/system/tray/system_tray_bubble.cc')
| -rw-r--r-- | ash/system/tray/system_tray_bubble.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ash/system/tray/system_tray_bubble.cc b/ash/system/tray/system_tray_bubble.cc index a934a7b..eeac33b 100644 --- a/ash/system/tray/system_tray_bubble.cc +++ b/ash/system/tray/system_tray_bubble.cc @@ -255,6 +255,13 @@ void SystemTrayBubble::UpdateView( items_ = items; bubble_type_ = bubble_type; CreateItemViews(Shell::GetInstance()->tray_delegate()->GetUserLoginStatus()); + + // Close bubble view if we failed to create the item view. + if (!bubble_view_->has_children()) { + Close(); + return; + } + bubble_widget_->GetContentsView()->Layout(); // Make sure that the bubble is large enough for the default view. if (bubble_type_ == BUBBLE_TYPE_DEFAULT) { |
