Skip to content
Snippets Groups Projects
Commit 3afd1855 authored by Don Gagne's avatar Don Gagne
Browse files

Correctly handle UAS going away

parent 9a141821
No related branches found
No related tags found
No related merge requests found
......@@ -473,17 +473,18 @@ 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;
}
if (uas) {
// Now connect the new UAS
addSource(uas);
this->uas = uas;
}
}
/**
* Rotate a polygon around a point
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment