[alsa] Fix scan-build issue: Argument with 'nonnull' attribute passed null

This commit is contained in:
ejurgensen 2018-12-23 21:24:13 +01:00
parent 2ffb94c9d1
commit a37fc0916f

View File

@ -622,7 +622,7 @@ buffer_write(struct alsa_session *as, uint8_t *buf, snd_pcm_sframes_t *avail, in
nsamp = AIRTUNES_V2_PACKET_SAMPLES;
if (prebuffering || !prebuf_empty || *avail < AIRTUNES_V2_PACKET_SAMPLES)
if (as->prebuf && (prebuffering || !prebuf_empty || *avail < AIRTUNES_V2_PACKET_SAMPLES))
{
pkt = &as->prebuf[as->prebuf_head * PACKET_SIZE];