]> git.mxchange.org Git - flightgear.git/commitdiff
Fix a potential crash with William Riley's scenery build.
authorcurt <curt>
Wed, 9 Oct 2002 14:29:42 +0000 (14:29 +0000)
committercurt <curt>
Wed, 9 Oct 2002 14:29:42 +0000 (14:29 +0000)
src/Objects/matlib.cxx
src/Objects/pt_lights.cxx
src/Scenery/tileentry.cxx

index 346d5c9a53d316389d61207a35c651cb90e6ca64..342918bd4390f0ac9ff5b9e37258a8796e3c2d46 100644 (file)
@@ -252,6 +252,7 @@ bool FGMaterialLib::load( const string& mpath ) {
     matlib["RWY_WHITE_LIGHTS"] = new FGNewMat(rwy_white_lights);
     // For backwards compatibility ... remove someday
     matlib["RUNWAY_LIGHTS"] = new FGNewMat(rwy_white_lights);
+    matlib["RWY_LIGHTS"] = new FGNewMat(rwy_white_lights);
     // end of backwards compatitibilty
 
     // hard coded runway vasi light state
index 366a1381e2c31be75321702e69091658fa579c47..7f2f0334117f500a413884872fb883ac24dc3ff9 100644 (file)
@@ -101,8 +101,13 @@ ssgLeaf *gen_directional_light( sgVec3 pt, sgVec3 dir, sgVec3 up,
         new ssgVtxTable ( GL_TRIANGLES, vl, nl, NULL, cl );
 
     FGNewMat *newmat = material_lib.find( material );
-    // FGNewMat *newmat = material_lib.find( "IrrCropPastureCover" );
-    leaf->setState( newmat->get_state() );
+
+    if ( newmat != NULL ) {
+        leaf->setState( newmat->get_state() );
+    } else {
+        SG_LOG( SG_TERRAIN, SG_ALERT, "Warning: can't material = "
+                << material );
+    }
 
     return leaf;
 }
index fca86633bb57fec4c75ee08c1699e4962860b270..59e909d2ce14c2ee799bfb6cb47142b9587c2145 100644 (file)
@@ -1348,7 +1348,7 @@ FGTileEntry::load( const SGPath& base, bool is_base )
 
     // Add runway lights to scene graph if any exist
     if ( rwy_lights_range->getNumKids() > 0 ) {
-        SG_LOG( SG_TERRAIN, SG_INFO, "adding runway lights" );
+        SG_LOG( SG_TERRAIN, SG_DEBUG, "adding runway lights" );
         rwy_lights_transform->addKid( rwy_lights_range );
         rwy_lights_transform->setTransform( &sgcoord );
     }