Fail on mismatch of nodes and normals.
This commit is contained in:
parent
d3b9b645ad
commit
f57f8ef7ce
1 changed files with 7 additions and 0 deletions
|
@ -221,6 +221,13 @@ ssgBranch *fgObjLoad( const string& path, FGTileEntry *t) {
|
||||||
// if first usemtl with shared_done = false, then set
|
// if first usemtl with shared_done = false, then set
|
||||||
// shared_done true and build the ssg shared lists
|
// shared_done true and build the ssg shared lists
|
||||||
if ( ! shared_done ) {
|
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;
|
shared_done = true;
|
||||||
|
|
||||||
t->vtlist = new sgVec3 [ nodes.size() ];
|
t->vtlist = new sgVec3 [ nodes.size() ];
|
||||||
|
|
Loading…
Reference in a new issue