diff -r 4441b066368c -r 374a9519986b lemon/lgf_reader.h --- a/lemon/lgf_reader.h Wed Jan 11 22:58:05 2012 +0100 +++ b/lemon/lgf_reader.h Sun Feb 05 00:04:44 2012 +0100 @@ -2953,7 +2953,10 @@ throw FormatError(msg.str()); } - e = _graph.addEdge(source, target); + // It is checked that source is red and + // target is blue, so this should be safe: + e = _graph.addEdge(_graph.asRedNodeUnsafe(source), + _graph.asBlueNodeUnsafe(target)); if (label_index != -1) _edge_index.insert(std::make_pair(tokens[label_index], e)); } else {