Potential fix for bug #471 (crash in checkspeedadjustment).
This commit is contained in:
parent
6ddc8e3390
commit
a6de24461e
1 changed files with 2 additions and 1 deletions
|
@ -853,6 +853,7 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat,
|
|||
SGGeod curr(SGGeod::fromDegM(lon, lat, alt));
|
||||
//TrafficVector iterator closest;
|
||||
closest = current;
|
||||
closestOnNetwork = current;
|
||||
for (TrafficVectorIterator i = activeTraffic.begin();
|
||||
i != activeTraffic.end(); i++) {
|
||||
if (i == current) {
|
||||
|
@ -953,7 +954,7 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat,
|
|||
}
|
||||
}
|
||||
}
|
||||
if ((closest == closestOnNetwork) && (current->getPriority() < closest->getPriority()) && needBraking) {
|
||||
if ((closest->getId() == closestOnNetwork->getId()) && (current->getPriority() < closest->getPriority()) && needBraking) {
|
||||
swap(current, closest);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue