diff --git a/code/ObjFileParser.cpp b/code/ObjFileParser.cpp index d89d52977..a8d92497d 100644 --- a/code/ObjFileParser.cpp +++ b/code/ObjFileParser.cpp @@ -353,7 +353,8 @@ void ObjFileParser::getHomogeneousVector3( std::vector &point3d_arra copyNextWord( m_buffer, Buffersize ); w = ( ai_real ) fast_atof( m_buffer ); - ai_assert( w != 0 ); + if (w == 0) + throw DeadlyImportError("OBJ: Invalid component in homogeneous vector (Division by zero)"); point3d_array.push_back( aiVector3D( x/w, y/w, z/w ) ); m_DataIt = skipLine( m_DataIt, m_DataItEnd, m_uiLine );