diff --git a/arch/sim/src/sim/posix/sim_alsa.c b/arch/sim/src/sim/posix/sim_alsa.c index 78b8ad6ab0..31dd67bb7f 100644 --- a/arch/sim/src/sim/posix/sim_alsa.c +++ b/arch/sim/src/sim/posix/sim_alsa.c @@ -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) *