audio_hw: Prevent referencing input devices from empty list
authorVasyl Gello <vasek.gello@gmail.com>
Sun, 1 Jul 2018 07:57:35 +0000 (10:57 +0300)
committerSimon Shields <simon@lineageos.org>
Wed, 25 Jul 2018 07:41:39 +0000 (09:41 +0200)
commit0095f3df328f33e6f48062725ae20e8f8ded1d70
treee042e1e7df8ec1664385d93de36463206f63b41b
parent41069235e8f80724107035b592965f6b1c434023
audio_hw: Prevent referencing input devices from empty list

Fixes audioserver crash in in_get_capture_position() if PCM input
device was not properly opened.

Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
Change-Id: I2f2d9bc8151cf61af112a9544268513effacacb5
audio/audio_hw.c