0001019: Crash on document recompute
This commit is contained in:
parent
3025c6e292
commit
18355cdd25
|
@ -1090,24 +1090,25 @@ std::vector<App::DocumentObject*> Document::getInList(const DocumentObject* me)
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
void Document::_rebuildDependencyList(void){
|
||||
|
||||
void Document::_rebuildDependencyList(void)
|
||||
{
|
||||
d->VertexObjectList.clear();
|
||||
d->DepList.clear();
|
||||
// Filling up the adjacency List
|
||||
for (std::map<std::string,DocumentObject*>::const_iterator It = d->objectMap.begin(); It != d->objectMap.end();++It)
|
||||
for (std::map<std::string,DocumentObject*>::const_iterator It = d->objectMap.begin(); It != d->objectMap.end();++It) {
|
||||
// add the object as Vertex and remember the index
|
||||
d->VertexObjectList[It->second] = add_vertex(d->DepList);
|
||||
}
|
||||
// add the edges
|
||||
for (std::map<std::string,DocumentObject*>::const_iterator It = d->objectMap.begin(); It != d->objectMap.end();++It) {
|
||||
std::vector<DocumentObject*> OutList = It->second->getOutList();
|
||||
for (std::vector<DocumentObject*>::const_iterator It2=OutList.begin();It2!=OutList.end();++It2)
|
||||
for (std::vector<DocumentObject*>::const_iterator It2=OutList.begin();It2!=OutList.end();++It2) {
|
||||
if (*It2)
|
||||
add_edge(d->VertexObjectList[It->second],d->VertexObjectList[*It2],d->DepList);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Document::recompute()
|
||||
{
|
||||
// delete recompute log
|
||||
|
@ -1115,7 +1116,7 @@ void Document::recompute()
|
|||
delete *it;
|
||||
_RecomputeLog.clear();
|
||||
|
||||
// updates the depency graph
|
||||
// updates the dependency graph
|
||||
_rebuildDependencyList();
|
||||
|
||||
//DependencyList DepList;
|
||||
|
|
Loading…
Reference in New Issue
Block a user