It's possible for an device to be counted but getting its name fails, in which case the utility function returns true but would continue from its loop filling the AudioDeviceNames vector, leading to a smaller output than the later code expects. No-Try: True Bug: b/144729866 Change-Id: If902cada4ef2911bc24fbec0f169da75ff6e6a83 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160020 Commit-Queue: Henrik Andreassson <henrika@webrtc.org> Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29840}