diff --git a/src/App/PropertyLinks.cpp b/src/App/PropertyLinks.cpp index c151d2b4ebb1..44b79a607c25 100644 --- a/src/App/PropertyLinks.cpp +++ b/src/App/PropertyLinks.cpp @@ -4618,10 +4618,14 @@ void PropertyXLinkContainer::clearDeps() { auto owner = dynamic_cast(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;