Commit acbb4d34 authored by Don Gagne's avatar Don Gagne

Fix null reference

parent 726ab07d
...@@ -248,11 +248,11 @@ void UASQuickView::updateTimerTick() ...@@ -248,11 +248,11 @@ void UASQuickView::updateTimerTick()
void UASQuickView::_activeVehicleChanged(Vehicle* vehicle) void UASQuickView::_activeVehicleChanged(Vehicle* vehicle)
{ {
if (uas) { if (uas || !vehicle) {
return; return;
} }
this->uas = vehicle->uas(); this->uas = vehicle->uas();
connect(uas,SIGNAL(valueChanged(int,QString,QString,QVariant,quint64)),this,SLOT(valueChanged(int,QString,QString,QVariant,quint64))); connect(uas, SIGNAL(valueChanged(int,QString,QString,QVariant,quint64)),this,SLOT(valueChanged(int,QString,QString,QVariant,quint64)));
} }
void UASQuickView::addSource(MAVLinkDecoder *decoder) void UASQuickView::addSource(MAVLinkDecoder *decoder)
{ {
......
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