diff --git a/src/PlugIn.cpp b/src/PlugIn.cpp index 16f38a4..815da80 100644 --- a/src/PlugIn.cpp +++ b/src/PlugIn.cpp @@ -558,10 +558,16 @@ void PlugIn::OnGetTagItem(EuroScopePlugIn::CFlightPlan flightPlan, EuroScopePlug } case TagItemElement::PlannedTimeOfArrival: { - if (this->m_inbounds.cend() != it) - message = UtcTime::timeToString(it->second.pta(), "%H:%M"); - else if (true == forced || true == planExpected) + if (this->m_inbounds.cend() != it) { + const auto pta = it->second.pta(); + if (UtcTime::Point() == pta) + message = "??:??"; + else + message = UtcTime::timeToString(it->second.pta(), "%H:%M"); + } + else if (true == forced || true == planExpected) { message = "??:??"; + } break; } case TagItemElement::DeltaTime: diff --git a/src/types/Inbound.cpp b/src/types/Inbound.cpp index 59631bd..b3eb52e 100644 --- a/src/types/Inbound.cpp +++ b/src/types/Inbound.cpp @@ -420,6 +420,8 @@ UtcTime::Point Inbound::eta() const { } UtcTime::Point Inbound::pta() const { + if (this->m_nextStarWaypoint >= this->m_arrivalRoute.size()) + return UtcTime::Point(); return gsl::at(this->m_arrivalRoute, this->m_nextStarWaypoint).plannedArrivalTime(); }