From e178af50f0904985bf14d92fa7fc4a5b7546ccf8 Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 16 Oct 2000 14:55:34 +0000 Subject: [PATCH] Check result of cur_fdm_state->init() and die if it fails. --- src/Main/fg_init.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.39.5