From af2491b6e9090fd5d774123e6c2aee4b7de97f10 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Wed, 31 Oct 2018 04:32:24 +0200 Subject: guard from nullptr --- libasound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libasound.c') diff --git a/libasound.c b/libasound.c index 5d66ef2..15fb3e4 100644 --- a/libasound.c +++ b/libasound.c @@ -677,7 +677,7 @@ snd_pcm_hw_params_get_format_mask(snd_pcm_hw_params_t *params, snd_pcm_format_ma SND_PCM_FORMAT_FLOAT_BE }; static snd_pcm_format_mask_t def_mask = { .fmts = def_fmts, .nmemb = ARRAY_SIZE(def_fmts) }; - *mask = def_mask; + if (mask) *mask = def_mask; } int -- cgit v1.2.3