From 432dd28fd6e899a3854c5a02e855ac08ff4f2307 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Tue, 3 Aug 2010 11:22:18 +0000
Subject: [PATCH] fix for backward compatibility

---
 Geo/Geo.cpp                                         | 4 ++--
 benchmarks/extrude/t1_boundary_layer_connection.geo | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp
index 94e66667ca..0b4c82746e 100644
--- a/Geo/Geo.cpp
+++ b/Geo/Geo.cpp
@@ -914,14 +914,14 @@ static Curve *DuplicateCurve(Curve *c, bool copyMeshingMethod)
   Curve *pc = Create_Curve(NEWLINE(), 0, 1, NULL, NULL, -1, -1, 0., 1.);
   CopyCurve(c, pc, copyMeshingMethod);
   Tree_Insert(GModel::current()->getGEOInternals()->Curves, &pc);
-  pc->beg = DuplicateVertex(c->beg);
-  pc->end = DuplicateVertex(c->end);
   for(int i = 0; i < List_Nbr(c->Control_Points); i++) {
     Vertex *v;
     List_Read(pc->Control_Points, i, &v);
     Vertex *newv = DuplicateVertex(v);
     List_Write(pc->Control_Points, i, &newv);
   }
+  pc->beg = DuplicateVertex(c->beg);
+  pc->end = DuplicateVertex(c->end);
   CreateReversedCurve(pc);
   return pc;
 }
diff --git a/benchmarks/extrude/t1_boundary_layer_connection.geo b/benchmarks/extrude/t1_boundary_layer_connection.geo
index 21f04bb8da..41a3643f92 100644
--- a/benchmarks/extrude/t1_boundary_layer_connection.geo
+++ b/benchmarks/extrude/t1_boundary_layer_connection.geo
@@ -16,10 +16,9 @@ Extrude { Surface{6}; Layers{5, 0.01}; Recombine; }
 
 Point(100) = {0,  0, 0.15, lc} ;
 Point(101) = {.1, 0, 0.15, lc} ;
-/*
+
 Line(100) = {8, 100};
 Line(101) = {12, 101};
 Line(102) = {100, 101};
 Line Loop(100) = {9,101,-102,-100};
 Plane Surface(100) = 100;
-*/
-- 
GitLab