Merge "hal: Fix a pointer deference issue"

This commit is contained in:
qctecmdr 2019-05-14 07:00:24 -07:00 committed by Gerrit - the friendly Code Review server
commit 6dde11630e
1 changed files with 1 additions and 1 deletions

View File

@ -8403,7 +8403,7 @@ static bool platform_check_capture_codec_backend_cfg(struct audio_device* adev,
} else if (my_data->is_internal_codec && !audio_is_usb_in_device(snd_device)) {
sample_rate = CODEC_BACKEND_DEFAULT_SAMPLE_RATE;
channels = CODEC_BACKEND_DEFAULT_TX_CHANNELS;
if (adev->active_input->bit_width == 24)
if (adev->active_input && adev->active_input->bit_width == 24)
bit_width = platform_get_snd_device_bit_width(snd_device);
} else {
struct listnode *node;