From: curt Date: Mon, 16 Oct 2000 14:55:34 +0000 (+0000) Subject: Check result of cur_fdm_state->init() and die if it fails. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e178af50f0904985bf14d92fa7fc4a5b7546ccf8;p=flightgear.git Check result of cur_fdm_state->init() and die if it fails. --- diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 018e18d4d..c89aafab8 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -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