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:
parent
508c367c5b
commit
a972df05dc
1 changed files with 3 additions and 0 deletions
|
@ -190,6 +190,9 @@ FGTrafficRecord::FGTrafficRecord():
|
|||
|
||||
FGTrafficRecord::~FGTrafficRecord()
|
||||
{
|
||||
if (aircraft) {
|
||||
aircraft->clearATCController();
|
||||
}
|
||||
}
|
||||
|
||||
void FGTrafficRecord::setPositionAndIntentions(int pos,
|
||||
|
|
Loading…
Reference in a new issue