hal: check offload_callback not NULL before calling
- in case when offload o/p stream is created in blocking mode
flinger do not sets the callback pointer. So check for offload
callback pointer before calling.
Change-Id: I4192c8cc793c48d7647d7652366c8c92ceb469cc
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 62ae7b7..3f3f967 100755
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1327,7 +1327,7 @@
pthread_mutex_lock(&out->lock);
out->offload_thread_blocked = false;
pthread_cond_signal(&out->cond);
- if (send_callback) {
+ if (send_callback && out->offload_callback) {
ALOGVV("%s: sending offload_callback event %d", __func__, event);
out->offload_callback(event, NULL, out->offload_cookie);
}