summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-22 21:34:14 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-22 21:34:14 +0000
commit6de5fa88bb574c780de38272617bf59355ca02d2 (patch)
tree06aed0f68f547537c6bc965481336a47f94bc298 /ash
parent63b912640aa79a094a2e228ce877746d2ce1b219 (diff)
downloadchromium_src-6de5fa88bb574c780de38272617bf59355ca02d2.zip
chromium_src-6de5fa88bb574c780de38272617bf59355ca02d2.tar.gz
chromium_src-6de5fa88bb574c780de38272617bf59355ca02d2.tar.bz2
ash: Fix crash when using --disable-ash-uber-tray.
BUG=110130 TEST=none Review URL: https://chromiumcodereview.appspot.com/9808008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128305 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/wm/shelf_layout_manager.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/ash/wm/shelf_layout_manager.cc b/ash/wm/shelf_layout_manager.cc
index fb16d3e..06a020b 100644
--- a/ash/wm/shelf_layout_manager.cc
+++ b/ash/wm/shelf_layout_manager.cc
@@ -310,7 +310,8 @@ void ShelfLayoutManager::UpdateShelfBackground(
launcher_->SetPaintsBackground(launcher_paints, type);
// SystemTray normally draws a background, but we don't want it to draw a
// background when the launcher does.
- Shell::GetInstance()->tray()->SetPaintsBackground(!launcher_paints, type);
+ if (Shell::GetInstance()->tray())
+ Shell::GetInstance()->tray()->SetPaintsBackground(!launcher_paints, type);
}
bool ShelfLayoutManager::GetLauncherPaintsBackground() const {
@@ -327,7 +328,7 @@ ShelfLayoutManager::AutoHideState ShelfLayoutManager::CalculateAutoHideState(
return AUTO_HIDE_HIDDEN;
Shell* shell = Shell::GetInstance();
- if (shell->tray()->showing_bubble())
+ if (shell->tray() && shell->tray()->showing_bubble())
return AUTO_HIDE_SHOWN; // Always show if a bubble is open from the shelf.
aura::RootWindow* root = launcher_widget()->GetNativeView()->GetRootWindow();