1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 22:30:03 -04:00

check point count before tessellating bezier (#2506)

This commit is contained in:
lictex_
2023-01-23 19:20:05 +08:00
committed by GitHub
parent f87c6cbd7c
commit 01bbda4544

View File

@@ -1507,6 +1507,10 @@ impl Tessellator {
stroke: Stroke, stroke: Stroke,
out: &mut Mesh, out: &mut Mesh,
) { ) {
if points.len() < 2 {
return;
}
self.scratchpad_path.clear(); self.scratchpad_path.clear();
if closed { if closed {
self.scratchpad_path.add_line_loop(points); self.scratchpad_path.add_line_loop(points);