]> git.mxchange.org Git - flightgear.git/commitdiff
Check result of cur_fdm_state->init() and die if it fails.
authorcurt <curt>
Mon, 16 Oct 2000 14:55:34 +0000 (14:55 +0000)
committercurt <curt>
Mon, 16 Oct 2000 14:55:34 +0000 (14:55 +0000)
src/Main/fg_init.cxx

index 018e18d4d1af706ad5f28c99282c28f646e7b537..c89aafab84f1e1c393e2d84b0e5dc3f4ff98f0a8 100644 (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