From: curt Date: Wed, 30 Jun 1999 00:26:43 +0000 (+0000) Subject: Ssg tweaks. Better handling of missing tiles. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5329ce82c56e41d842390e42a0b978db5124207a;p=flightgear.git Ssg tweaks. Better handling of missing tiles. --- diff --git a/src/Objects/obj.cxx b/src/Objects/obj.cxx index 4b41122f4..22dd6a1f2 100644 --- a/src/Objects/obj.cxx +++ b/src/Objects/obj.cxx @@ -158,13 +158,14 @@ ssgBranch *fgObjLoad( const string& path, FGTileEntry *t) { int i; ssgSimpleState *state = NULL; - // printf("loading %s\n", path.c_str() ); + ssgBranch *tile = new ssgBranch () ; + tile -> setName ( path.c_str() ) ; // Attempt to open "path.gz" or "path" fg_gzifstream in( path ); if ( ! in.is_open() ) { FG_LOG( FG_TERRAIN, FG_ALERT, "Cannot open file: " << path ); - return 0; + return NULL; } shading = current_options.get_shading(); @@ -179,9 +180,6 @@ ssgBranch *fgObjLoad( const string& path, FGTileEntry *t) { StopWatch stopwatch; stopwatch.start(); - ssgBranch *tile = new ssgBranch () ; - tile -> setName ( path.c_str() ) ; - // ignore initial comments and blank lines. (priming the pump) // in >> skipcomment; string line;