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

Unified Diff: ash/common/system/status_area_widget.cc

Issue 2557593009: Fix Chrome crashes on calling OnTrayVisibilityChange (Closed)
Patch Set: address comments Created 4 years 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
Index: ash/common/system/status_area_widget.cc
diff --git a/ash/common/system/status_area_widget.cc b/ash/common/system/status_area_widget.cc
index 06bdf90c0d2c21eceda997e746f013cf09ae213d..7d69835501563da6c5d3ccd133454acac25a8f7b 100644
--- a/ash/common/system/status_area_widget.cc
+++ b/ash/common/system/status_area_widget.cc
@@ -282,10 +282,11 @@ void StatusAreaWidget::AddImeMenuTray() {
bool StatusAreaWidget::IsNextVisibleTrayToLogout(
TrayBackgroundView* tray) const {
+ if (!logout_button_tray_)
Daniele Castagna 2016/12/13 17:24:58 Is whoever needs this going to call IsNextVisibleT
+ return false;
+
int logout_button_index =
status_area_widget_delegate_->GetIndexOf(logout_button_tray_);
- // Logout button should always exist.
- DCHECK_NE(-1, logout_button_index);
if (!logout_button_tray_->visible())
return false;

Powered by Google App Engine
This is Rietveld 408576698