Skip to content

Commit ebef20f

Browse files
committed
Fix Line2D not rendering anything when total length is not computed
1 parent b607110 commit ebef20f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scene/2d/line_builder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void LineBuilder::build() {
112112
}
113113
}
114114

115-
if (Math::is_zero_approx(total_distance)) {
115+
if (point_count < 2 || (distance_required && Math::is_zero_approx(total_distance))) {
116116
// Zero-length line, nothing to build.
117117
return;
118118
}

0 commit comments

Comments
 (0)