From f57f8ef7ce3751aa502f05be734d8c41b10dd123 Mon Sep 17 00:00:00 2001 From: curt Date: Sat, 3 Jul 1999 04:03:59 +0000 Subject: [PATCH] Fail on mismatch of nodes and normals. --- src/Objects/obj.cxx | 7 +++++++ 1 file changed, 7 insertions(+) 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() ]; -- 2.39.5