Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2356)

Unified Diff: content/browser/media/capture/desktop_capture_device_aura.cc

Issue 801823002: Fix segfault when unplugging captured external display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..60713dc127b105a901b2f95896fb5dd43f4480a4 100644
--- a/content/browser/media/capture/desktop_capture_device_aura.cc
+++ b/content/browser/media/capture/desktop_capture_device_aura.cc
@@ -235,8 +235,10 @@ void DesktopVideoCaptureMachine::Stop(const base::Closure& callback) {
// Stop observing compositor and window events.
if (desktop_window_) {
- if (desktop_window_->GetHost())
- desktop_window_->GetHost()->compositor()->RemoveObserver(this);
+ aura::WindowTreeHost* wth = desktop_window_->GetHost();
Sergey Ulanov 2014/12/12 18:46:53 Please use a more descriptive name. From http://go
+ // In the host destructor the compositor is destroyed before the window.
+ if (wth && wth->compositor())
+ wth->compositor()->RemoveObserver(this);
desktop_window_->RemoveObserver(this);
desktop_window_ = NULL;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698