fixed #177 (explicit empty mtl base dir given)

This commit is contained in:
Max Limper
2018-07-09 12:21:46 +02:00
parent eba327b9c0
commit c4e7e65acb

View File

@@ -1736,9 +1736,8 @@ bool LoadObj(attrib_t *attrib, std::vector<shape_t> *shapes,
return false; return false;
} }
std::string baseDir; std::string baseDir = mtl_basedir ? mtl_basedir : "";
if (mtl_basedir) { if (!baseDir.empty()) {
baseDir = mtl_basedir;
#ifndef _WIN32 #ifndef _WIN32
const char dirsep = '/'; const char dirsep = '/';
#else #else