diff --git a/code/ObjFileParser.cpp b/code/ObjFileParser.cpp index acf275b94..4b203a8c2 100644 --- a/code/ObjFileParser.cpp +++ b/code/ObjFileParser.cpp @@ -475,7 +475,11 @@ void ObjFileParser::getFace( aiPrimitiveType type ) { } else { reportErrorTokenInFace(); } + } else { + //On error, std::atoi will return 0 which is not a valid value + throw DeadlyImportError("OBJ: Invalid face indice"); } + } m_DataIt += iStep; }