Check result of cur_fdm_state->init() and die if it fails.
This commit is contained in:
parent
47c3f41828
commit
e178af50f0
1 changed files with 6 additions and 1 deletions
|
@ -696,7 +696,12 @@ bool fgInitSubsystems( void ) {
|
|||
|
||||
// fgFDMInit( current_options.get_flight_model(), cur_fdm_state,
|
||||
// 1.0 / current_options.get_model_hz() );
|
||||
cur_fdm_state->init( 1.0 / current_options.get_model_hz() );
|
||||
if ( cur_fdm_state->init( 1.0 / current_options.get_model_hz() ) ) {
|
||||
// fdm init successful
|
||||
} else {
|
||||
FG_LOG( FG_GENERAL, FG_ALERT, "FDM init() failed! Cannot continue." );
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
// I'm just sticking this here for now, it should probably move
|
||||
// eventually
|
||||
|
|
Loading…
Add table
Reference in a new issue