diff -r dbe3fc9c875d -r 32155c88f59b lemon/smart_graph.h --- a/lemon/smart_graph.h Tue Jul 29 14:41:55 2008 +0200 +++ b/lemon/smart_graph.h Tue Jul 29 15:06:37 2008 +0200 @@ -465,7 +465,9 @@ explicit Arc(int id) { _id = id;} public: - operator Edge() const { return edgeFromId(_id / 2); } + operator Edge() const { + return _id != -1 ? edgeFromId(_id / 2) : INVALID; + } Arc() {} Arc (Invalid) { _id = -1; }