mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-06-08 11:13:50 +00:00
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -5151,6 +5151,13 @@ TINYGLTF3_API tg3_error_code tg3_validate(
|
||||
i, img->buffer_view, model->buffer_views_count);
|
||||
}
|
||||
|
||||
if (img->buffer_view >= 0 &&
|
||||
(img->mime_type.data == NULL || img->mime_type.len == 0)) {
|
||||
TG3__VERR(TG3_ERR_INVALID_IMAGE, path,
|
||||
"image[%u] uses bufferView but is missing mimeType",
|
||||
i);
|
||||
}
|
||||
|
||||
/* An image should have either a URI or a bufferView */
|
||||
{
|
||||
int has_uri = (img->uri.data != NULL && img->uri.len > 0);
|
||||
|
||||
Reference in New Issue
Block a user