Browse Source

Improved sanity checking

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@287 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
marksibly 16 years ago
parent
commit
521fbb977e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      code/B3DImporter.cpp

+ 1 - 1
code/B3DImporter.cpp

@@ -221,7 +221,7 @@ void B3DImporter::ReadBRUS(){
 
 		for( int i=0;i<n_texs;++i ){
 			int texid=ReadInt();
-			if( !i ){
+			if( !i && texid>=0 && texid<_textures.size() ){
 				//just use tex 0 for now
 				const Texture &tex=_textures[texid];