prevent crash with unconfigured audio (#21775)

This commit is contained in:
Christian Baars 2024-07-14 21:00:24 +02:00 committed by GitHub
parent e9fdbea091
commit 6673fb906b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -179,6 +179,10 @@ void (* const I2SAudio_Command[])(void) PROGMEM = {
\*********************************************************************************************/
void CmndI2SConfig(void) {
if(!audio_i2s.Settings){
ResponseCmndChar_P(PSTR("no valid settings"));
return;
}
tI2SSettings * cfg = audio_i2s.Settings;
// if (zigbee.init_phase) { ResponseCmndChar_P(PSTR(D_ZIGBEE_NOT_STARTED)); return; }