diff --git a/mesh.cpp b/mesh.cpp index 6e37dd6..ae8cc4e 100644 --- a/mesh.cpp +++ b/mesh.cpp @@ -475,6 +475,11 @@ triangulate: SBsp3 *SBsp3::Insert(STriangle *tr, SMesh *instead) { if(!this) { + if(instead && !(instead->flipNormal)) { + instead->AddTriangle(tr->a, tr->b, tr->c); + return NULL; + } + // Brand new node; so allocate for it, and fill us in. SBsp3 *r = Alloc(); r->n = (tr->Normal()).WithMagnitude(1);