Index: ui/aura/desktop.cc |
diff --git a/ui/aura/desktop.cc b/ui/aura/desktop.cc |
index 38818e69f46b9ae7776eb9f29d2b8a256da85d82..7bf25d3abb037af965a710fe6d7e5fd8bb6fac0c 100644 |
--- a/ui/aura/desktop.cc |
+++ b/ui/aura/desktop.cc |
@@ -429,6 +429,9 @@ Desktop::Desktop() |
Desktop::~Desktop() { |
in_destructor_ = true; |
+ // Make sure to destroy the compositor before terminating so that state is |
+ // cleared and we don't hit asserts. |
+ compositor_ = NULL; |
#ifdef USE_WEBKIT_COMPOSITOR |
if (!ui::Compositor::compositor_factory()) |
ui::CompositorCC::Terminate(); |