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

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: 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..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;
« 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