Gui: prevent DAGView crash freecad when a document gets a circular dependency
This commit is contained in:
parent
2fc5d6c818
commit
37320a0bfa
|
@ -527,7 +527,15 @@ void Model::updateSlot()
|
|||
|
||||
indexVerticesEdges();
|
||||
Path sorted;
|
||||
boost::topological_sort(*theGraph, std::back_inserter(sorted));
|
||||
try {
|
||||
// this sort gives the execute
|
||||
boost::topological_sort(*theGraph, std::back_inserter(sorted));
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
std::cerr << "Document::recompute: " << e.what() << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
//index the vertices in sort order.
|
||||
int tempIndex = 0;
|
||||
for (const auto ¤tVertex : sorted)
|
||||
|
|
Loading…
Reference in New Issue
Block a user