Commit 3afd1855 authored by Don Gagne's avatar Don Gagne

Correctly handle UAS going away

parent 9a141821
......@@ -473,16 +473,17 @@ void HDDisplay::renderOverlay()
*/
void HDDisplay::setActiveUAS(UASInterface* uas)
{
if (!uas)
return;
// Disconnect any previously connected active UAS
if (this->uas != NULL) {
removeSource(this->uas);
this->uas = NULL;
}
// Now connect the new UAS
addSource(uas);
this->uas = uas;
if (uas) {
// Now connect the new UAS
addSource(uas);
this->uas = uas;
}
}
/**
......
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