forgotten safety check (#21549)

This commit is contained in:
Christian Baars 2024-06-03 12:09:38 +02:00 committed by GitHub
parent 2d33a77ba5
commit 7b678ba2c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -1052,6 +1052,10 @@ void CmndI2SI2SRtttl(void) {
}
void CmndI2SMicRec(void) {
if (I2SPrepareRx()) {
ResponseCmndChar("I2S Mic not configured");
return;
}
if (audio_i2s_mp3.mp3ram == nullptr){
AddLog(LOG_LEVEL_DEBUG,PSTR("I2S: try late buffer allocation for mp3 encoder"));
audio_i2s_mp3.mp3ram = special_malloc(preallocateCodecSize);