Properly fail also when external *.bin are missing from *.glb.

Consistency with behavior for external *.bin files referenced from
*.gltf.
This commit is contained in:
Vladimír Vondruš 2018-08-16 21:07:56 +02:00
parent 6d38ca3894
commit fd84ceb791

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