Fix crash caused by freeing capturer task
This commit is contained in:
parent
5510d8cfb1
commit
593ae7bf0e
1 changed files with 4 additions and 3 deletions
|
@ -216,6 +216,10 @@ void NativeDesktopMediaList::Worker::Refresh(
|
|||
BrowserThread::PostTask(
|
||||
BrowserThread::UI, FROM_HERE,
|
||||
base::Bind(&NativeDesktopMediaList::OnRefreshFinished, media_list_));
|
||||
|
||||
// Destroy capturers when done.
|
||||
screen_capturer_.reset();
|
||||
window_capturer_.reset();
|
||||
}
|
||||
|
||||
void NativeDesktopMediaList::Worker::OnCaptureResult(
|
||||
|
@ -368,8 +372,5 @@ void NativeDesktopMediaList::OnRefreshFinished() {
|
|||
base::Bind(&NativeDesktopMediaList::Refresh,
|
||||
weak_factory_.GetWeakPtr()),
|
||||
update_period_);
|
||||
} else {
|
||||
// Destroy the capturers.
|
||||
worker_.reset();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue