detecting invalid mat definition.
This commit is contained in:
Kim Kulling
2016-12-19 20:44:00 +01:00
parent bd0449ea79
commit b934331985
2 changed files with 23 additions and 2 deletions

View File

@@ -568,7 +568,10 @@ void ObjFileParser::getMaterialLib() {
std::string absName;
// Check if directive is valid.
if(!strMatName.length()) throw DeadlyImportError("File name of the material is absent.");
if ( 0 == strMatName.length() ) {
DefaultLogger::get()->warn( "OBJ: no name for material library specified." );
return;
}
if ( m_pIO->StackSize() > 0 ) {
std::string path = m_pIO->CurrentDirectory();