Skip to content

Commit

Permalink
Merge pull request #102870 from timoschwarzer/fix/line-2d-not-rendering
Browse files Browse the repository at this point in the history
Fix Line2D not rendering anything when total length is not computed
  • Loading branch information
akien-mga committed Feb 14, 2025
2 parents 11d8e2e + ebef20f commit 96cdbbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/2d/line_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void LineBuilder::build() {
}
}

if (Math::is_zero_approx(total_distance)) {
if (point_count < 2 || (distance_required && Math::is_zero_approx(total_distance))) {
// Zero-length line, nothing to build.
return;
}
Expand Down

0 comments on commit 96cdbbe

Please sign in to comment.