summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-10-31 04:32:24 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2018-10-31 04:32:24 +0200
commitaf2491b6e9090fd5d774123e6c2aee4b7de97f10 (patch)
treef641e1885f2e84b683a802059163de80470c059f
parentdb107e04caeb9ccca17f552276028c67967d0ed7 (diff)
guard from nullptr
-rw-r--r--libasound.c2
1 files changed, 1 insertions, 1 deletions
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