From f938a6b744bf9a951f60016dd982520fc3a41d4f Mon Sep 17 00:00:00 2001 From: kimkulling Date: Fri, 12 Jun 2020 14:52:02 +0200 Subject: [PATCH] fix leak: just ignore broken texture coordinates. --- code/AssetLib/glTF2/glTF2Importer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/AssetLib/glTF2/glTF2Importer.cpp b/code/AssetLib/glTF2/glTF2Importer.cpp index a957d9d9b..1c044e7ce 100644 --- a/code/AssetLib/glTF2/glTF2Importer.cpp +++ b/code/AssetLib/glTF2/glTF2Importer.cpp @@ -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) { 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) {