fix leak: just ignore broken texture coordinates.

pull/3279/head
kimkulling 2020-06-12 14:52:02 +02:00
parent 1e0c5f26b4
commit f938a6b744
1 changed files with 2 additions and 1 deletions

View File

@ -417,7 +417,8 @@ void glTF2Importer::ImportMeshes(glTF2::Asset &r) {
} }
for (size_t tc = 0; tc < attr.texcoord.size() && tc < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++tc) { for (size_t tc = 0; tc < attr.texcoord.size() && tc < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++tc) {
if (!attr.texcoord[tc]) { if (!attr.texcoord[tc]) {
throw DeadlyImportError("GLTF: Texture coordinate accessor not found or non-contiguous texture coordinate sets"); DefaultLogger::get()->warn("Texture coordinate accessor not found or non-contiguous texture coordinate sets.");
continue;
} }
if (attr.texcoord[tc]->count != aim->mNumVertices) { if (attr.texcoord[tc]->count != aim->mNumVertices) {