Skip to content

Commit

Permalink
Avoid checking selected aircraft data vector if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
EightSmart committed Jul 24, 2024
1 parent 9314051 commit 3252b7c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions MissedApproach/MissedApproachAlarm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,11 @@ void MissedApproachAlarm::OnFlightPlanControllerAssignedDataUpdate(CFlightPlan F
}
else if (scratchPadString.find("MISAP_") != string::npos) {
// Trigger Alarm (TWR) if selected from tag
if (strcmp(selectedAcftData[0].c_str(), FlightPlan.GetCallsign()) == 0) {
actButtonState = 1;
resetButtonState = -1;
if (!selectedAcftData.empty()) {
if (strcmp(selectedAcftData[0].c_str(), FlightPlan.GetCallsign()) == 0) {
actButtonState = 1;
resetButtonState = -1;
}
}

// Trigger alarm (APP)
Expand Down

0 comments on commit 3252b7c

Please sign in to comment.