Don't crash on exit, when initialization was aborted.
Some errors cause fgfs to abort/exit before "controls" is set.
This commit is contained in:
parent
557b16da6e
commit
dcc8d22f7c
1 changed files with 6 additions and 2 deletions
|
@ -182,8 +182,12 @@ FGGlobals::~FGGlobals()
|
|||
delete current_panel;
|
||||
|
||||
delete ATC_mgr;
|
||||
controls->unbind();
|
||||
delete controls;
|
||||
|
||||
if (controls)
|
||||
{
|
||||
controls->unbind();
|
||||
delete controls;
|
||||
}
|
||||
|
||||
delete channel_options_list;
|
||||
delete initial_waypoints;
|
||||
|
|
Loading…
Add table
Reference in a new issue