Index: ui/views/view.cc |
diff --git a/ui/views/view.cc b/ui/views/view.cc |
index 3cb42dca9dab0b6b57422f07348b4cc15293f3fa..d5da6b5b07f827138f42f7776b2f301d3001f928 100644 |
--- a/ui/views/view.cc |
+++ b/ui/views/view.cc |
@@ -128,6 +128,10 @@ View::~View() { |
ViewStorage::GetInstance()->ViewRemoved(this); |
+ // Some layout managers hold a reference to the host that they are installed |
+ // to and may need to access this during destruction. |
+ layout_manager_.reset(); |
+ |
for (Views::const_iterator i(children_.begin()); i != children_.end(); ++i) { |
(*i)->parent_ = NULL; |
if (!(*i)->owned_by_client_) |