diff --git a/tiny_gltf.h b/tiny_gltf.h index c3a6fb1..efd1e1e 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -923,7 +923,7 @@ static bool LoadExternalFile(std::vector *out, std::string *err, paths.push_back("."); std::string filepath = FindFile(paths, filename); - if (filepath.empty()) { + if (filepath.empty() || filename.empty()) { if (err) { (*err) += "File not found : " + filename + "\n"; }