1
0
Fork 0

Fix a potential use-after-free in ATC code

- when dynamics shuts down the ATC controllers, they clear their
  traffic vectors (destroying the records), but we didn’t notify
  the AI aircraft of this. Ensure the controller is cleared so
  the AI aircraft shutdown doesn’t crash.
This commit is contained in:
James Turner 2016-01-11 13:01:05 -06:00
parent 508c367c5b
commit a972df05dc

View file

@ -190,6 +190,9 @@ FGTrafficRecord::FGTrafficRecord():
FGTrafficRecord::~FGTrafficRecord()
{
if (aircraft) {
aircraft->clearATCController();
}
}
void FGTrafficRecord::setPositionAndIntentions(int pos,