diff options
author | kmackay <kmackay@chromium.org> | 2015-12-14 22:53:51 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-15 06:54:44 +0000 |
commit | e7a588c73cdc67b03df1e1aedb26567717c73ae8 (patch) | |
tree | bc8016b3bca68f8eff43b50043c19958fec05f5b /chromecast/renderer | |
parent | d317eedd409d3c7760b6bf0873b17b3f2fad4bf8 (diff) | |
download | chromium_src-e7a588c73cdc67b03df1e1aedb26567717c73ae8.zip chromium_src-e7a588c73cdc67b03df1e1aedb26567717c73ae8.tar.gz chromium_src-e7a588c73cdc67b03df1e1aedb26567717c73ae8.tar.bz2 |
[Chromecast] Fix a renderer crash if an error occurs while flushing.
BUG= internal b/25003220
Review URL: https://codereview.chromium.org/1409853004
Cr-Commit-Position: refs/heads/master@{#365193}
Diffstat (limited to 'chromecast/renderer')
-rw-r--r-- | chromecast/renderer/media/cma_renderer.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chromecast/renderer/media/cma_renderer.cc b/chromecast/renderer/media/cma_renderer.cc index c410967..a2cdf74 100644 --- a/chromecast/renderer/media/cma_renderer.cc +++ b/chromecast/renderer/media/cma_renderer.cc @@ -451,7 +451,10 @@ void CmaRenderer::OnFlushDone(::media::PipelineStatus status) { } CompleteStateTransition(kFlushed); - base::ResetAndReturn(&flush_cb_).Run(); + // If OnError was called while the flush was in progress, |flush_cb_| might + // be null. + if (!flush_cb_.is_null()) + base::ResetAndReturn(&flush_cb_).Run(); } void CmaRenderer::OnError(::media::PipelineStatus error) { |