Fix dangling pointers in CefAudioMirrorDestination (fixes issue #2713).

This commit is contained in:
Riku Palomäki
2019-07-16 21:42:39 +00:00
committed by Marshall Greenblatt
parent 1086495096
commit 367c6eb704
4 changed files with 13 additions and 10 deletions

View File

@ -2744,8 +2744,8 @@ bool CefBrowserHostImpl::StartAudioMirroring() {
if (client_.get()) {
CefRefPtr<CefAudioHandler> audio_handler = client_->GetAudioHandler();
if (audio_handler.get()) {
audio_mirror_destination_.reset(new CefAudioMirrorDestination(
this, audio_handler, content::AudioMirroringManager::GetInstance()));
audio_mirror_destination_ = new CefAudioMirrorDestination(
this, audio_handler, content::AudioMirroringManager::GetInstance());
audio_mirror_destination_->Start();
return true;
}