fix dangling reference issue

This commit is contained in:
xs5871 2022-06-03 10:50:17 +00:00 committed by Kyle Brown
parent 645124dab6
commit d6659cd1a3

View File

@ -275,11 +275,10 @@ class RGB(Extension):
if 0 <= index <= self.num_pixels - 1:
for pixels in self.pixels:
if index <= (len(pixels) - 1):
pixels[index] = rgb
break
index -= len(pixels)
pixels[index] = rgb
if not self.disable_auto_write:
pixels.show()