File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1321,7 +1321,7 @@ class AudioReactive : public Usermod {
13211321 disableSoundProcessing = true ;
13221322 } else {
13231323 #if defined(ARDUINO_ARCH_ESP32) && defined(WLED_DEBUG)
1324- if ((disableSoundProcessing == true ) && (audioSyncEnabled == 0 ) && audioSource->isInitialized ()) { // we just switched to "enabled"
1324+ if ((disableSoundProcessing == true ) && (audioSyncEnabled == 0 ) && audioSource && audioSource ->isInitialized ()) { // we just switched to "enabled"
13251325 DEBUG_PRINTLN (F (" [AR userLoop] realtime mode ended - audio processing resumed." ));
13261326 DEBUG_PRINTF_P (PSTR (" RealtimeMode = %d; RealtimeOverride = %d\n " ), int (realtimeMode), int (realtimeOverride));
13271327 }
@@ -1333,7 +1333,7 @@ class AudioReactive : public Usermod {
13331333 if (audioSyncEnabled & 0x02 ) disableSoundProcessing = true ; // make sure everything is disabled IF in audio Receive mode
13341334 if (audioSyncEnabled & 0x01 ) disableSoundProcessing = false ; // keep running audio IF we're in audio Transmit mode
13351335#ifdef ARDUINO_ARCH_ESP32
1336- if (!audioSource->isInitialized ()) disableSoundProcessing = true ; // no audio source
1336+ if (!audioSource || !audioSource ->isInitialized ()) disableSoundProcessing = true ; // no audio source
13371337
13381338
13391339 // Only run the sampling code IF we're not in Receive mode or realtime mode
You can’t perform that action at this time.
0 commit comments