From: curt Date: Sat, 3 Jul 1999 04:03:59 +0000 (+0000) Subject: Fail on mismatch of nodes and normals. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;ds=sidebyside;h=f57f8ef7ce3751aa502f05be734d8c41b10dd123;p=flightgear.git Fail on mismatch of nodes and normals. --- diff --git a/src/Objects/obj.cxx b/src/Objects/obj.cxx index 22dd6a1f2..3e7f998d1 100644 --- a/src/Objects/obj.cxx +++ b/src/Objects/obj.cxx @@ -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() ];