Skip to content

Commit e5ba87a

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 8f16b44 + 636ab49 commit e5ba87a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compas_viewer/scene/buffermanager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def update_object_data(self, obj: Any) -> None:
316316

317317
# Convert to numpy arrays
318318
pos_array = np.array(positions, dtype=np.float32).flatten()
319-
col_array = np.array([c.rgba for c in colors] if isinstance(colors[0], Color) else colors, dtype=np.float32).flatten()
319+
col_array = np.array([c.rgba for c in colors] if len(colors) > 0 and isinstance(colors[0], Color) else colors, dtype=np.float32).flatten()
320320

321321
# Find the start and end indices for this object in the buffer
322322
start_idx = 0

0 commit comments

Comments
 (0)