GPS: fix crash when failing to build RNav controller
Sentry-Id: FLIGHTGEAR-FFX
This commit is contained in:
parent
41587d61ee
commit
73b14cd69d
1 changed files with 5 additions and 1 deletions
|
@ -714,7 +714,11 @@ double GPS::computeTurnRadiusNm(double aGroundSpeedKts) const
|
|||
|
||||
void GPS::updateRouteData()
|
||||
{
|
||||
double totalDistance = _wayptController->distanceToWayptM() * SG_METER_TO_NM;
|
||||
double totalDistance = 0.0;
|
||||
// waypt controller might be null: Sentry-Id: FLIGHTGEAR-FFX
|
||||
if (_wayptController) {
|
||||
totalDistance = _wayptController->distanceToWayptM() * SG_METER_TO_NM;
|
||||
}
|
||||
|
||||
if (_route) {
|
||||
// walk all waypoints from wp2 to route end, and sum
|
||||
|
|
Loading…
Add table
Reference in a new issue