Bugfix for gif player WRT inactive segment and bugfix in copy FX

- if a segment is destroyed or turned inactive, disable the gif player: only one gif player instance can run at a time, if a inactive or destroyed segment uses it, the effect is broken for other segments.

- copy FX ironically copied the source segment on each call, should use reference not a copy!
This commit is contained in:
Damian Schneider
2025-10-02 20:40:43 +02:00
committed by Frank
parent 47153baa0c
commit e5ab0b6077
2 changed files with 10 additions and 0 deletions

View File

@@ -542,6 +542,9 @@ void Segment::setUp(uint16_t i1, uint16_t i2, uint8_t grp, uint8_t spc, uint16_t
if (stop>start) markForBlank(); //turn old segment range off // WLEDMM stop > start // toDo: check if this can be skipped when boundsUnchanged
if (i2 <= i1) { //disable segment
#ifdef WLED_ENABLE_GIF
endImagePlayback(this);
#endif
stop = 0;
markForReset();
return;