Obj: Change asserts to exceptions

These can be triggered by malformed input file so they can't be assertions.
This commit is contained in:
Turo Lamminen
2015-04-01 16:12:46 +03:00
parent 4c28f31f43
commit 3e728e80eb
2 changed files with 4 additions and 2 deletions

View File

@@ -259,7 +259,7 @@ void ObjFileParser::getVector( std::vector<aiVector3D> &point3d_array ) {
copyNextWord( m_buffer, BUFFERSIZE );
z = ( float ) fast_atof( m_buffer );
} else {
ai_assert( !"Invalid number of components" );
throw DeadlyImportError( "OBJ: Invalid number of components" );
}
point3d_array.push_back( aiVector3D( x, y, z ) );
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );