We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents be7b640 + 842421e commit d408264Copy full SHA for d408264
scene/2d/line_2d.cpp
@@ -299,6 +299,9 @@ void Line2D::_draw() {
299
}
300
301
lb.build();
302
+ if (lb.indices.is_empty()) {
303
+ return;
304
+ }
305
306
RS::get_singleton()->canvas_item_add_triangle_array(
307
get_canvas_item(),
scene/2d/line_builder.cpp
@@ -112,6 +112,11 @@ void LineBuilder::build() {
112
113
114
115
+ if (Math::is_zero_approx(total_distance)) {
116
+ // Zero-length line, nothing to build.
117
118
119
+
120
if (_interpolate_color) {
121
color0 = gradient->get_color(0);
122
} else {
0 commit comments