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

Unified Diff: ash/system/settings/tray_settings.cc

Issue 11421180: Fix uber tray crash on stumpy which has no battery (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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: ash/system/settings/tray_settings.cc
diff --git a/ash/system/settings/tray_settings.cc b/ash/system/settings/tray_settings.cc
index 49ba7300694f58cece954c67fe5ab218e4bb3fc0..3be23862f53a37bfa9904faa26ee4ca1d1dde5c3 100644
--- a/ash/system/settings/tray_settings.cc
+++ b/ash/system/settings/tray_settings.cc
@@ -69,8 +69,9 @@ class SettingsDefaultView : public ash::internal::ActionableView {
virtual ~SettingsDefaultView() {}
void UpdatePowerStatus(const PowerSupplyStatus& status) {
- if (power_status_view_)
- power_status_view_->UpdatePowerStatus(status);
+ if (!power_status_view_)
+ return;
+ power_status_view_->UpdatePowerStatus(status);
string16 accessible_name = label_ ?
label_->text() + ASCIIToUTF16(", ") +
power_status_view_->accessible_name() :
« 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