diff -r 949510b70df9 -r 9f22c22fe227 lemon/core.h --- a/lemon/core.h Fri Jun 25 05:48:27 2010 +0200 +++ b/lemon/core.h Fri Jun 25 06:15:43 2010 +0200 @@ -394,6 +394,7 @@ template static void copy(const From& from, Digraph &to, NodeRefMap& nodeRefMap, ArcRefMap& arcRefMap) { + to.clear(); for (typename From::NodeIt it(from); it != INVALID; ++it) { nodeRefMap[it] = to.addNode(); } @@ -421,6 +422,7 @@ template static void copy(const From& from, Graph &to, NodeRefMap& nodeRefMap, EdgeRefMap& edgeRefMap) { + to.clear(); for (typename From::NodeIt it(from); it != INVALID; ++it) { nodeRefMap[it] = to.addNode(); }