diff --git a/platform/posix/wav_util.c b/platform/posix/wav_util.c index 58de2f911..ad65210bf 100644 --- a/platform/posix/wav_util.c +++ b/platform/posix/wav_util.c @@ -146,7 +146,9 @@ int wav_writer_close(void){ } int wav_writer_write_int8(int num_samples, int8_t * data){ - if (data == NULL) return 1; + btstack_assert(data != NULL); + if (wav_writer_state.wav_file == NULL) return 1; + int i = 0; int8_t zero_byte = 0; for (i=0; i