Skip to content

Commit

Permalink
App: [skip ci] check object status before accessing back links
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Feb 22, 2021
1 parent 442b1a5 commit 1241752
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/App/PropertyLinks.cpp
Expand Up @@ -4618,10 +4618,14 @@ void PropertyXLinkContainer::clearDeps() {
auto owner = dynamic_cast<App::DocumentObject*>(getContainer());
if(!owner || !owner->getNameInDocument())
return;
for(auto obj : _Deps) {
if(obj && obj->getNameInDocument() && obj->getDocument()==owner->getDocument())
obj->_removeBackLink(owner);
#ifndef USE_OLD_DAG
if (!owner->testStatus(ObjectStatus::Destroy)) {
for(auto obj : _Deps) {
if(obj && obj->getNameInDocument() && obj->getDocument()==owner->getDocument())
obj->_removeBackLink(owner);
}
}
#endif
_Deps.clear();
_XLinks.clear();
_LinkRestored = false;
Expand Down

0 comments on commit 1241752

Please sign in to comment.