Skip to content

Commit

Permalink
Playlist corrupting JSON buffer bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
blazoncek committed Dec 10, 2021
1 parent e72a8d9 commit 3f0258e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wled00/playlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ int16_t loadPlaylist(JsonObject playlistObj, byte presetId) {

void handlePlaylist() {
static unsigned long presetCycledTime = 0;
if (currentPlaylist < 0 || playlistEntries == nullptr) return;
// if fileDoc is not null JSON buffer is in use so just quit
if (currentPlaylist < 0 || playlistEntries == nullptr || fileDoc != nullptr) return;

if (millis() - presetCycledTime > (100*playlistEntryDur)) {
presetCycledTime = millis();
Expand Down

0 comments on commit 3f0258e

Please sign in to comment.