Index: content/browser/media/capture/desktop_capture_device_aura.cc |
diff --git a/content/browser/media/capture/desktop_capture_device_aura.cc b/content/browser/media/capture/desktop_capture_device_aura.cc |
index 6b6557f1844058b74dc539b5d6b24289630dbaba..81ee8e2647ec6adf9bf573ff9637124c9b2b6934 100644 |
--- a/content/browser/media/capture/desktop_capture_device_aura.cc |
+++ b/content/browser/media/capture/desktop_capture_device_aura.cc |
@@ -235,7 +235,8 @@ void DesktopVideoCaptureMachine::Stop(const base::Closure& callback) { |
// Stop observing compositor and window events. |
if (desktop_window_) { |
- if (desktop_window_->GetHost()) |
+ // In the host destructor the compositor is destroyed before the window |
Sergey Ulanov
2014/12/12 17:42:34
nit: add . at the end of the comment
|
+ if (desktop_window_->GetHost() && desktop_window_->GetHost()->compositor()) |
Sergey Ulanov
2014/12/12 17:42:34
Store GetHost() result so it doesn't have to be ca
|
desktop_window_->GetHost()->compositor()->RemoveObserver(this); |
desktop_window_->RemoveObserver(this); |
desktop_window_ = NULL; |