Index: ash/root_window_controller.cc |
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc |
index 15fba6b576d0d02381e576ad0bd48c6d49d53f1a..bf7060af1fc78b9947d2081a659535bd73b25734 100644 |
--- a/ash/root_window_controller.cc |
+++ b/ash/root_window_controller.cc |
@@ -285,6 +285,10 @@ void RootWindowController::CreateContainers() { |
void RootWindowController::CloseChildWindows() { |
// Close background widget first as it depends on tooltip. |
+ if (root_window_->GetProperty(internal::kComponentWrapper) && |
+ (root_window_->GetProperty(internal::kWindowDesktopComponent) != |
+ root_window_->GetProperty(internal::kComponentWrapper)->component())) |
+ delete root_window_->GetProperty(internal::kComponentWrapper)->component(); |
root_window_->SetProperty(kWindowDesktopComponent, |
static_cast<DesktopBackgroundWidgetController*>(NULL)); |
root_window_->SetProperty(kComponentWrapper, |