Properly build path to the mtl file when loading loading obj

This commit is contained in:
Łukasz Twarduś
2015-10-19 22:07:32 +02:00
parent 282a913b7f
commit 3274bcf8d6
2 changed files with 6 additions and 3 deletions

View File

@@ -138,7 +138,7 @@ void ObjFileImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
if ( pos != std::string::npos ) {
modelName = pFile.substr(pos+1, pFile.size() - pos - 1);
folderName = pFile.substr( 0, pos );
if ( folderName.empty() ) {
if ( !folderName.empty() ) {
pIOHandler->PushDirectory( folderName );
}
} else {