Merge "hal: add NULL check for active input stream"
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index f07a3ce..34a9937 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -2275,7 +2275,8 @@
/* 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) {