Fix warning when aggregate decorator cannot be drawn on the screen.

This commit is contained in:
Dion Moult
2025-01-23 20:29:21 +11:00
parent a7a9fcc73a
commit 35d2791657
@@ -270,6 +270,8 @@ class AggregateModeDecorator:
blf.color(self.font_id, *color)
text = aggregate_obj.name
text_coords = view3d_utils.location_3d_to_region_2d(region, rv3d, aggregate_obj.location)
if not text_coords:
return
text_length = blf.dimensions(self.font_id, text)
text_coords[0] -= text_length[0] / 2
text_coords[1] -= 20