diff options
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) { |