From 56604aa3a56dc8e15532597a0a74b3c7b165e006 Mon Sep 17 00:00:00 2001 From: Uday Gupta Date: Tue, 13 May 2014 11:19:17 -0700 Subject: Codec Offload: Add NULL check as mCallbackThread is NULL when offloaded HAL is running BLOCKING mode b/14897952 Change-Id: I159a33e1181c1a62d80ab4bd3337a35dafaad884 Signed-off-by: Uday Gupta Signed-off-by: Pierre Couillaud --- services/audioflinger/Threads.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'services') diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index 1da5147..69a1883 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -3951,7 +3951,10 @@ void AudioFlinger::OffloadThread::threadLoop_exit() mMixerStatus = MIXER_DRAIN_ALL; threadLoop_drain(); } - mCallbackThread->exit(); + if (mUseAsyncWrite) { + ALOG_ASSERT(mCallbackThread != 0); + mCallbackThread->exit(); + } PlaybackThread::threadLoop_exit(); } -- cgit v1.1