From: ehofman Date: Sat, 31 May 2003 13:38:10 +0000 (+0000) Subject: Fix a initialization ordering bug: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f30f40a2fb11141a370b35d12a63f9430bde68ae;p=flightgear.git Fix a initialization ordering bug: Melchior FRANZ: The reason: these models are to be added to the scenery, but the scenery isn't yet set up at this point. The correct order is: - set up model_lib (needed by the scenery) - set up scenery (needed by the model manager) - set up model manager --- diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 17bdd49c8..1cc9fe5c0 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -1690,13 +1690,7 @@ static bool fgMainInit( int argc, char **argv ) { //////////////////////////////////////////////////////////////////// globals->set_matlib( new SGMaterialLib ); - //////////////////////////////////////////////////////////////////// - // Initialize the general model subsystem. - //////////////////////////////////////////////////////////////////// globals->set_model_lib(new SGModelLib); - globals->set_model_mgr(new FGModelMgr); - globals->get_model_mgr()->init(); - globals->get_model_mgr()->bind(); //////////////////////////////////////////////////////////////////// // Initialize the TG scenery subsystem. @@ -1706,6 +1700,13 @@ static bool fgMainInit( int argc, char **argv ) { globals->get_scenery()->bind(); globals->set_tile_mgr( new FGTileMgr ); + //////////////////////////////////////////////////////////////////// + // Initialize the general model subsystem. + //////////////////////////////////////////////////////////////////// + globals->set_model_mgr(new FGModelMgr); + globals->get_model_mgr()->init(); + globals->get_model_mgr()->bind(); + //////////////////////////////////////////////////////////////////// // Initialize the 3D aircraft model subsystem (has a dependency on // the scenery subsystem.)