Index: cycle_breaker.cc |
diff --git a/cycle_breaker.cc b/cycle_breaker.cc |
index 6e0689891f615f8d7f220e38f707629c0664a353..0998dac5e7ac89934fbc958abdbf34ea32e6fe16 100644 |
--- a/cycle_breaker.cc |
+++ b/cycle_breaker.cc |
@@ -133,7 +133,11 @@ bool CycleBreaker::Circuit(Vertex::Index vertex) { |
for (Vertex::SubgraphEdgeMap::iterator w = |
subgraph_[vertex].subgraph_edges.begin(); |
w != subgraph_[vertex].subgraph_edges.end(); ++w) { |
- subgraph_[*w].subgraph_edges.insert(vertex); |
+ if (blocked_graph_[*w].out_edges.find(vertex) == |
+ blocked_graph_[*w].out_edges.end()) { |
+ blocked_graph_[*w].out_edges.insert(make_pair(vertex, |
+ EdgeProperties())); |
+ } |
} |
} |
CHECK_EQ(vertex, stack_.back()); |