fix dangling reference issue
This commit is contained in:
parent
645124dab6
commit
d6659cd1a3
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user