From 6673fb906bdc755eddbfc71d85e3eb9b9d11cd91 Mon Sep 17 00:00:00 2001 From: Christian Baars Date: Sun, 14 Jul 2024 21:00:24 +0200 Subject: [PATCH] prevent crash with unconfigured audio (#21775) --- tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_audio_idf51.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_audio_idf51.ino b/tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_audio_idf51.ino index f65d7c722..cd8dccd85 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_audio_idf51.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_audio_idf51.ino @@ -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; }