this avoids heap corruption, by double-checking that "use global leds" is not configured, before trying to free ledsrgb[].

It is still a mystery why Segment::_globalLeds == nullptr.
This commit is contained in:
Frank
2024-01-02 15:52:00 +01:00
parent f699a56220
commit 01c187f8aa
2 changed files with 10 additions and 2 deletions

View File

@@ -82,7 +82,10 @@ void strip_wait_until_idle(String whoCalledMe) {
}
#endif
}
// WLEDMM another helper for segment class
bool strip_uses_global_leds(void) {
return strip.useLedsArray;
}
///////////////////////////////////////////////////////////////////////////////
// Segment class implementation