| Index: ash/desktop_background/desktop_background_controller.cc
|
| diff --git a/ash/desktop_background/desktop_background_controller.cc b/ash/desktop_background/desktop_background_controller.cc
|
| index a40974dcaf8174b084f175d032da0f561aa01099..617cf9bdc7062745b797ce7f93520bc5c1620914 100644
|
| --- a/ash/desktop_background/desktop_background_controller.cc
|
| +++ b/ash/desktop_background/desktop_background_controller.cc
|
| @@ -165,13 +165,18 @@ gfx::Size DesktopBackgroundController::GetMaxDisplaySizeInNative() {
|
| int height = 0;
|
| std::vector<display::Display> displays =
|
| display::Screen::GetScreen()->GetAllDisplays();
|
| - DisplayManager* display_manager = Shell::GetInstance()->display_manager();
|
| + DisplayManager* display_manager =
|
| + Shell::HasInstance() ? Shell::GetInstance()->display_manager() : nullptr;
|
|
|
| for (std::vector<display::Display>::iterator iter = displays.begin();
|
| iter != displays.end(); ++iter) {
|
| // Don't use size_in_pixel because we want to use the native pixel size.
|
| - gfx::Size size_in_pixel =
|
| - display_manager->GetDisplayInfo(iter->id()).bounds_in_native().size();
|
| + // TODO(msw): Fix this for Mash/Mus.
|
| + gfx::Size size_in_pixel = display_manager
|
| + ? display_manager->GetDisplayInfo(iter->id())
|
| + .bounds_in_native()
|
| + .size()
|
| + : iter->size();
|
| if (iter->rotation() == display::Display::ROTATE_90 ||
|
| iter->rotation() == display::Display::ROTATE_270) {
|
| size_in_pixel = gfx::Size(size_in_pixel.height(), size_in_pixel.width());
|
|
|