Extra check in component

This commit is contained in:
Klaus Basan
2014-12-20 18:42:06 +01:00
parent 0b03ac1339
commit beb23ea0c0

View File

@@ -139,8 +139,8 @@ namespace BlackGui
if (this->getIContextNetwork())
{
CAtcStationList selectedStations = this->getIContextNetwork()->getSelectedAtcStations();
CAtcStation com1Station = selectedStations[0];
CAtcStation com2Station = selectedStations[1];
CAtcStation com1Station = selectedStations.size() > 0 ? selectedStations[0] : CAtcStation();
CAtcStation com2Station = selectedStations.size() > 1 ? selectedStations[1] : CAtcStation();
if (com1Station.getCallsign().isEmpty())
{
this->ui->lbl_ComPanelCom1Active->setToolTip("");