Fix a read of freed-data when closing props channels
Ensure we close all channels, before the NetPoller is destroyed, to avoid a use-after-free.
This commit is contained in:
parent
a05e5075b2
commit
16ae171333
1 changed files with 4 additions and 0 deletions
|
@ -717,6 +717,10 @@ FGProps::FGProps( const vector<string>& tokens )
|
|||
*/
|
||||
FGProps::~FGProps()
|
||||
{
|
||||
// ensure all channels are closed before our poller is destroyed
|
||||
if (is_enabled()) {
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue