Skip to content

Commit c025d39

Browse files
authored
Merge pull request #1960 from sloriot/BGL-fix_split_graph
Fix bug in split_graph_into_polylines
2 parents ec58002 + 3da1729 commit c025d39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

BGL/include/CGAL/boost/graph/split_graph_into_polylines.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,11 @@ split_graph_into_polylines(const Graph& graph,
283283
vertex_descriptor v = target(*b, g_copy);
284284
CGAL_assertion(u!=v);
285285
polyline_visitor.add_node(g_copy[v]);
286+
if (degree(v, g_copy)==1)
287+
terminal.erase(v);
286288
remove_edge(b, g_copy);
287289
u = v;
288290
}
289-
terminal.erase(u);
290291
polyline_visitor.end_polyline();
291292
}
292293

0 commit comments

Comments
 (0)