summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-04-28 09:47:16 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-04-28 09:47:16 -0300
commitec7ed5f36047c6f69d5e79f19a3a433aec3080fe (patch)
tree2c0868d4581f71cec236f54d4eab3ff8635c5184
parentc4d0f528b14cd022d2a360cee8f90c1c572b2ac4 (diff)
Avoid CSG freeze condition on degenerates
-rw-r--r--modules/csg/csg.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp
index 761a309751..e2da66a9f4 100644
--- a/modules/csg/csg.cpp
+++ b/modules/csg/csg.cpp
@@ -409,6 +409,9 @@ void CSGBrushOperation::BuildPoly::clip(const CSGBrush *p_brush, int p_face, Mes
//transform A points to 2D
+ if (segment[0].distance_to(segment[1]) < CMP_EPSILON)
+ return; //too small
+
_clip_segment(p_brush, p_face, segment, mesh_merge, p_for_B);
}