| Index: ash/common/wm/screen_dimmer.cc
|
| diff --git a/ash/common/wm/screen_dimmer.cc b/ash/common/wm/screen_dimmer.cc
|
| index b00ac9052f783197bc776c92630e9d1383a19883..00e936ae2d2ab10bccb6153bd5ef413b6538c69b 100644
|
| --- a/ash/common/wm/screen_dimmer.cc
|
| +++ b/ash/common/wm/screen_dimmer.cc
|
| @@ -32,7 +32,9 @@ ScreenDimmer::ScreenDimmer(Container container)
|
| }
|
|
|
| ScreenDimmer::~ScreenDimmer() {
|
| - WmShell::Get()->RemoveShellObserver(this);
|
| + // Usage in chrome results in ScreenDimmer outliving the shell.
|
| + if (WmShell::HasInstance())
|
| + WmShell::Get()->RemoveShellObserver(this);
|
| }
|
|
|
| void ScreenDimmer::SetDimming(bool should_dim) {
|
|
|