]> git.mxchange.org Git - flightgear.git/commitdiff
Fail on mismatch of nodes and normals.
authorcurt <curt>
Sat, 3 Jul 1999 04:03:59 +0000 (04:03 +0000)
committercurt <curt>
Sat, 3 Jul 1999 04:03:59 +0000 (04:03 +0000)
src/Objects/obj.cxx

index 22dd6a1f2671901f795d596be90ac6edca47cbff..3e7f998d1e350f9704bba8e27493590c7a6a3956 100644 (file)
@@ -221,6 +221,13 @@ ssgBranch *fgObjLoad( const string& path, FGTileEntry *t) {
                // if first usemtl with shared_done = false, then set
                // shared_done true and build the ssg shared lists
                if ( ! shared_done ) {
+                   // sanity check
+                   if ( nodes.size() != vncount ) {
+                       FG_LOG( FG_TERRAIN, FG_ALERT, 
+                               "Tile has mismatched nodes and normals: " 
+                               << path );
+                       exit(-1);
+                   }
                    shared_done = true;
 
                    t->vtlist = new sgVec3 [ nodes.size() ];