Commit 127dc08e authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

graph_generation.hh: Fix segfault

parent 7561129f
......@@ -538,9 +538,8 @@ struct gen_graph
while (s_deg.second > 0)
{
//assert(!targets.empty());
//assert(t_iter != targets.end());
// assert(!targets.empty());
// assert(t_iter != targets.end());
while (v_iter == vset.end() || v_iter->second.empty())
{
++t_iter;
......@@ -559,8 +558,8 @@ struct gen_graph
swap(v_list.back(), v_list.front());
v_list.pop_back();
update_deg(t_i, nt_deg, vset, targets, sources, g);
//t_iter = targets.begin();
//v_iter = vset.find(*t_iter);
t_iter = targets.begin();
v_iter = vset.find(*t_iter);
continue;
}
......@@ -591,6 +590,8 @@ struct gen_graph
update_deg(skip[i],
get_deg(vertices[skip[i]], g), vset,
targets, sources, g);
t_iter = targets.begin();
v_iter = vset.find(*t_iter);
}
skip.clear();
if (no_self_loops)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment