This commit is contained in:
IlyaShurupov 2024-03-31 13:02:07 +03:00
parent 613874b13a
commit 9af73a9de8

View file

@ -37,8 +37,7 @@ void Link::removeOutgoingLinks() {
auto& links = target->mIncomingLinks;
links.erase(std::remove_if(links.begin(), links.end(), [&](std::weak_ptr<Link>& node){
auto targetLink = node.lock();
assert(targetLink);
return targetLink.get() == this;
return !targetLink || targetLink.get() == this;
}), links.end());
}