Merge pull request #86 from mosra/fail-when-bin-missing-from-glb

Properly fail also when external *.bin are missing from *.glb.
This commit is contained in:
Syoyo Fujita 2018-08-17 19:52:09 +09:00 committed by GitHub
commit 96d2f314cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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