audio:fix crash when driver_audio capture
sim/posix/sim_alsa.c:728:24: runtime error: member access within null pointer of type 'const struct sim_codec_ops_s' Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
This commit is contained in:
parent
d7088fe376
commit
31fe15b6e0
@ -723,7 +723,7 @@ static int sim_audio_ioctl(struct audio_lowerhalf_s *dev, int cmd,
|
||||
struct ap_buffer_info_s *info =
|
||||
(struct ap_buffer_info_s *)arg;
|
||||
|
||||
if (priv->ops->get_samples)
|
||||
if (priv->ops && priv->ops->get_samples)
|
||||
{
|
||||
priv->buffer_size = MAX(priv->buffer_size,
|
||||
priv->ops->get_samples(priv->codec) *
|
||||
|
Loading…
Reference in New Issue
Block a user