Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e238a1ff authored by vivek mehta's avatar vivek mehta
Browse files

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
parent cbd30414
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 * Not a Contribution.
 *
 * Copyright (C) 2013 The Android Open Source Project
@@ -1311,7 +1311,7 @@ static void *offload_thread_loop(void *context)
        lock_output_stream(out);
        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);
        }