diff --git a/tiny_gltf.h b/tiny_gltf.h index 633f4b3..e253fce 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -2260,8 +2260,10 @@ static bool ParseBuffer(Buffer *buffer, std::string *err, const json &o, } } else { // External .bin file. - LoadExternalFile(&buffer->data, err, /* warn */ nullptr, buffer->uri, - basedir, bytes, true, fs); + if (!LoadExternalFile(&buffer->data, err, /* warn */ nullptr, buffer->uri, + basedir, bytes, true, fs)) { + return false; + } } } else { // load data from (embedded) binary data