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:
|
if 0 <= index <= self.num_pixels - 1:
|
||||||
for pixels in self.pixels:
|
for pixels in self.pixels:
|
||||||
if index <= (len(pixels) - 1):
|
if index <= (len(pixels) - 1):
|
||||||
|
pixels[index] = rgb
|
||||||
break
|
break
|
||||||
index -= len(pixels)
|
index -= len(pixels)
|
||||||
|
|
||||||
pixels[index] = rgb
|
|
||||||
|
|
||||||
if not self.disable_auto_write:
|
if not self.disable_auto_write:
|
||||||
pixels.show()
|
pixels.show()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user