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

Commit e2938530 authored by Weiyin Jiang's avatar Weiyin Jiang Committed by Gerrit - the friendly Code Review server
Browse files

audio: check for usecase type before accessing stream.out

check for usecase type before accessing stream.out

CRs-Fixed: 2458696
Change-Id: I7935f0ef7542a44c0f1c0e63812475138bc6256e
parent b0701bdc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1042,7 +1042,8 @@ int disable_audio_route(struct audio_device *adev,
    audio_extn_sound_trigger_update_stream_status(usecase, ST_EVENT_STREAM_FREE);
    audio_extn_listen_update_stream_status(usecase, LISTEN_EVENT_STREAM_FREE);
    audio_extn_set_custom_mtmx_params(adev, usecase, false);
    if (usecase->stream.out != NULL)
    if ((usecase->type == PCM_PLAYBACK) &&
            (usecase->stream.out != NULL))
        usecase->stream.out->pspd_coeff_sent = false;
    ALOGV("%s: exit", __func__);
    return 0;