1
0
Fork 0

Check result of cur_fdm_state->init() and die if it fails.

This commit is contained in:
curt 2000-10-16 14:55:34 +00:00
parent 47c3f41828
commit e178af50f0

View file

@ -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