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

Commit bbfa5f7b authored by Vidyakumar Athota's avatar Vidyakumar Athota Committed by Gerrit - the friendly Code Review server
Browse files

hal: add NULL check for active input stream

Check active input stream is valid or not before accessing
the input stream member variables.

Change-Id: Ibd0fdcccedbec988e917079c4b62ef286f56c58f
parent 4f702ea7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2275,7 +2275,8 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)

    /* If input stream is already running then effect needs to be
       applied on the new input device that's being enabled here.  */
    if ((in_snd_device != SND_DEVICE_NONE) && (!adev->active_input->standby))
    if ((in_snd_device != SND_DEVICE_NONE) && (adev->active_input != NULL) &&
        (!adev->active_input->standby))
        check_and_enable_effect(adev);

    if (usecase->type == VOICE_CALL || usecase->type == VOIP_CALL) {