1
0
Fork 0

Test for null object after load before trying to connect it into the scene

graph (which would cause a crash.)
This commit is contained in:
curt 2001-06-01 18:04:10 +00:00
parent b2f604ad00
commit 35533b3a8d

View file

@ -370,8 +370,10 @@ int FGTileMgr::update( double lon, double lat ) {
ssgTexturePath( (char *)(dm->get_texture_path().c_str()) );
ssgEntity *obj_model
= ssgLoad( (char *)(dm->get_model_path().c_str()) );
dm->get_obj_trans()->addKid( obj_model );
dm->get_tile()->dec_pending_models();
if ( obj_model != NULL ) {
dm->get_obj_trans()->addKid( obj_model );
}
dm->get_tile()->dec_pending_models();
delete dm;
}