sim/alsa: add ptr check in _stop
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
This commit is contained in:
parent
09afb4d7d0
commit
eba292f4b9
|
@ -560,11 +560,17 @@ static int sim_audio_stop(struct audio_lowerhalf_s *dev)
|
|||
priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_COMPLETE, NULL, OK);
|
||||
#endif
|
||||
|
||||
apb_free(priv->aux);
|
||||
priv->aux = NULL;
|
||||
if (priv->aux)
|
||||
{
|
||||
apb_free(priv->aux);
|
||||
priv->aux = NULL;
|
||||
}
|
||||
|
||||
priv->ops->uninit(priv->codec);
|
||||
priv->ops = NULL;
|
||||
if (priv->ops)
|
||||
{
|
||||
priv->ops->uninit(priv->codec);
|
||||
priv->ops = NULL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue