Commit 75b4bd0a authored by Don Gagne's avatar Don Gagne

QObject::destroyed signal fix

Make sure to no de-reference already deleted object
parent 717cef3e
......@@ -3374,11 +3374,9 @@ void UAS::addLink(LinkInterface* link)
void UAS::removeLink(QObject* object)
{
LinkInterface* link = dynamic_cast<LinkInterface*>(object);
if (link)
{
links->removeAt(links->indexOf(link));
}
// Be careful of the fact that by the time this signal makes it through the queue
// the link object has already been destructed.
links->removeAt(links->indexOf((LinkInterface*)object));
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment